file_path stringlengths 32 153 | content stringlengths 0 3.14M |
|---|---|
omniverse-code/kit/exts/omni.kit.widget.layers/omni/kit/widget/layers/tests/test_live_session.py | import carb
import omni.kit.test
import omni.usd
import omni.client
import unittest
import omni.kit.app
import carb
import omni.kit.test
import omni.usd
import omni.client
import unittest
import omni.kit.app
import omni.kit.widget.live_session_management as lsm
from .base import TestLayerUIBase
from omni.kit.usd.laye... |
omniverse-code/kit/exts/omni.kit.widget.layers/omni/kit/widget/layers/tests/drag_drop_single.py | ## Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
##
## NVIDIA CORPORATION and its licensors retain all intellectual property
## and proprietary rights in and to this software, related documentation
## and any modifications thereto. Any use, reproduction, disclosure or
## distribution of this software a... |
omniverse-code/kit/exts/omni.kit.widget.layers/omni/kit/widget/layers/tests/test_legacy_edit_mode.py | import carb
import omni.kit.test
import omni.kit.undo
import omni.kit.commands
import omni.timeline
import omni.usd
from omni.kit.widget.layers import LayerUtils
from pxr import Gf, Kind, Sdf, Usd, UsdGeom, UsdShade
from .base import TestLayerNonUIBase
class TestEditMode(TestLayerNonUIBase):
async def test_edit_... |
omniverse-code/kit/exts/omni.kit.widget.layers/omni/kit/widget/layers/tests/test_material_watcher.py | # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and rel... |
omniverse-code/kit/exts/omni.kit.widget.layers/omni/kit/widget/layers/tests/test_usd_events.py | import omni.kit.test
import os
import uuid
import omni.client
import omni.kit.commands
import omni.kit.usd.layers as layers
from stat import S_IREAD, S_IWRITE
from omni.kit.usd.layers import LayerUtils
from omni.kit.widget.layers.prim_spec_item import PrimSpecSpecifier
from .base import TestLayerUIBase
from pxr import... |
omniverse-code/kit/exts/omni.kit.widget.layers/omni/kit/widget/layers/tests/test_path_utils.py | import omni.kit.test
import omni.usd
from omni.kit.widget.layers.path_utils import PathUtils
class TestPathUtils(omni.kit.test.AsyncTestCase):
def test_utils(self):
path = "omniverse://test-server/invalid_path"
self.assertTrue(PathUtils.is_omni_path(path))
path = "c:/file.usd"
self... |
omniverse-code/kit/exts/omni.kit.widget.layers/omni/kit/widget/layers/tests/base.py | import carb
import omni
import omni.kit.test
import omni.usd
import omni.client
import omni.kit.widget.layers
from omni.kit.usd.layers import LayerUtils
from omni.kit.widget.layers.prim_spec_item import PrimSpecItem, PrimSpecSpecifier
from pxr import Sdf, Usd, UsdGeom, Gf
class TestLayerNonUIBase(omni.kit.test.Async... |
omniverse-code/kit/exts/omni.kit.widget.layers/omni/kit/widget/layers/tests/test_prim_spec_item.py | import omni.kit.test
import os
import uuid
import omni.client
from omni.kit.usd.layers import LayerUtils
from omni.kit.widget.layers.layer_settings import LayerSettings
from omni.kit.widget.layers.prim_spec_item import PrimSpecSpecifier
from .base import TestLayerUIBase
from pxr import Sdf, UsdGeom
class TestLayerPr... |
omniverse-code/kit/exts/omni.kit.widget.layers/omni/kit/widget/layers/tests/test_layer_model.py | import omni.kit.test
import os
import uuid
import omni.client
import tempfile
from .base import TestLayerUIBase
from pxr import Sdf, Usd
from omni.kit.usd.layers import LayerUtils
class TestLayerModelAPI(TestLayerUIBase):
async def setUp(self):
await super().setUp()
self.test_folder = omni.client... |
omniverse-code/kit/exts/omni.kit.widget.layers/omni/kit/widget/layers/tests/test_legacy_layer_cpp_bindings.py | import carb
import omni.kit.test
import omni.kit.undo
import omni.kit.commands
import omni.timeline
import omni.usd
import tempfile
import omni.client
from omni.kit.widget.layers import LayerUtils
from pxr import Sdf, UsdGeom
from .base import TestLayerNonUIBase
class TestCppBindings(TestLayerNonUIBase):
async ... |
omniverse-code/kit/exts/omni.kit.widget.layers/omni/kit/widget/layers/tests/__init__.py | from .test_misc import *
from .test_usd_events import *
from .test_prim_spec_item import *
from .test_performance import *
from .test_layer_model import *
from .test_path_utils import *
from .test_extension import *
from .test_layer_mode_utils import *
from .test_selection import *
from .drag_drop_single import *
from ... |
omniverse-code/kit/exts/omni.kit.widget.layers/omni/kit/widget/layers/tests/test_layer_mode_utils.py | import omni.kit.test
import os
import uuid
import omni.client
import omni.kit.ui
from omni.kit.widget.layers.layer_settings import LayerSettings
from omni.kit.widget.layers.layer_model_utils import LayerModelUtils
from omni.kit.widget.prompt import PromptManager
from omni.kit.usd.layers import LayerUtils
from .base imp... |
omniverse-code/kit/exts/omni.kit.widget.layers/omni/kit/widget/layers/tests/test_extension.py | import omni.kit.test
from pxr import Sdf
from .base import TestLayerUIBase
class TestLayerExtension(TestLayerUIBase):
async def setUp(self):
await super().setUp()
self.stage = await self.prepare_empty_stage()
async def tearDown(self):
await self.usd_context.close_stage_async()
a... |
omniverse-code/kit/exts/omni.kit.widget.layers/omni/kit/widget/layers/tests/test_context_menu.py | import omni.kit.test
import os
import tempfile
import shutil
import omni.client
import omni.kit.app
from .base import TestLayerUIBase
from pxr import Usd, Sdf
from stat import S_IREAD, S_IWRITE
from omni.kit.usd.layers import LayerUtils
from omni.kit.widget.prompt import PromptManager
class TestContextMenu(TestLayer... |
omniverse-code/kit/exts/omni.kit.widget.layers/omni/kit/widget/layers/tests/test_misc.py | import os
import string
import random
import unittest
import carb
import omni
import omni.kit.test
import omni.usd
import omni.client
import omni.kit.widget.layers
from pathlib import Path
from omni.kit.usd.layers import LayerUtils
from pxr import Sdf, Usd, UsdGeom
from .base import TestLayerNonUIBase
class TestLayer... |
omniverse-code/kit/exts/omni.kit.widget.layers/omni/kit/widget/layers/tests/test_window_ui_states.py | import omni.kit.test
import os
import tempfile
import shutil
import omni.client
import omni.kit.app
from .base import TestLayerNonUIBase
from pxr import Usd, Sdf
from stat import S_IREAD, S_IWRITE
from omni.kit.usd.layers import LayerUtils, get_layers
from omni.kit.widget.prompt import PromptManager
class TestWindow... |
omniverse-code/kit/exts/omni.kit.widget.layers/omni/kit/widget/layers/tests/drag_drop_multi.py | ## Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
##
## NVIDIA CORPORATION and its licensors retain all intellectual property
## and proprietary rights in and to this software, related documentation
## and any modifications thereto. Any use, reproduction, disclosure or
## distribution of this software a... |
omniverse-code/kit/exts/omni.kit.widget.layers/omni/kit/widget/layers/tests/test_hotkey.py | import carb
import omni.kit.app
from .base import TestLayerUIBase
from omni.kit.test_suite.helpers import arrange_windows
class TestHotkey(TestLayerUIBase):
# Before running each test
async def setUp(self):
await super().setUp()
await arrange_windows("Layer", 800, 600)
self.stage = ... |
omniverse-code/kit/exts/omni.kit.widget.layers/docs/CHANGELOG.md | # Changelog
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [1.6.11] - 2023-01-13
### Changes
- Save edit target into root layer before in SETTINGS_SAVING only to avoid actively change root layer.
## [1.6.10] - 2022-12-14
### Changes
- Improve drag and drop style.
## [1.6.9] - 20... |
omniverse-code/kit/exts/omni.kit.widget.layers/data/material_OmniPBR.usda | #usda 1.0
(
customLayerData = {
dictionary audioSettings = {
double dopplerLimit = 1
double dopplerScale = 1
double nonSpatialTimeScale = 1
double spatialTimeScale = 1
double speedOfSound = 340
}
dictionary cameraSettings = {
... |
omniverse-code/kit/exts/omni.kit.widget.layers/data/material_OmniGlass.usda | #usda 1.0
(
customLayerData = {
dictionary cameraSettings = {
dictionary Front = {
double3 position = (0, 0, 50000)
double radius = 500
}
dictionary Perspective = {
double3 position = (500.0000000000001, 500.0000000000001, 4... |
omniverse-code/kit/exts/omni.kit.widget.layers/data/tests/4Lights.usda | #usda 1.0
(
customLayerData = {
dictionary cameraSettings = {
dictionary Front = {
double3 position = (0, 0, 50000)
double radius = 500
}
dictionary Perspective = {
double3 position = (641.3717781423547, 641.3717781423395, 6... |
omniverse-code/kit/exts/omni.kit.widget.layers/data/tests/quatCube.usda | #usda 1.0
(
customLayerData = {
dictionary renderSettings = {
bool "rtx:ambientOcclusion:enabled" = 1
token "rtx:debugView" = ""
bool "rtx:directLighting:enabled" = 1
bool "rtx:forwardLitMode:enabled" = 0
bool "rtx:gbufferRaster:enabled" = 0
... |
omniverse-code/kit/exts/omni.kit.widget.layers/data/tests/bound_shapes.usda | #usda 1.0
(
customLayerData = {
dictionary cameraSettings = {
dictionary Front = {
double3 position = (0, 0, 50000)
double radius = 500
}
dictionary Perspective = {
double3 position = (500.0000000000001, 500.0000000000001, 4... |
omniverse-code/kit/exts/omni.kit.widget.layers/data/tests/ColorsSaltBox/SaltBox.usda | #usda 1.0
(
"Primary stage."
defaultPrim = "SaltBox"
metersPerUnit = 0.01
subLayers = [
@./material/material.usda@,
]
)
def "SaltBox" (
assetInfo = {
string entityType = "prop"
string name = "SaltBox"
string rigLocation = ""
}
kind = "component"
varia... |
omniverse-code/kit/exts/omni.kit.widget.layers/data/tests/ColorsSaltBox/material/material.usda | #usda 1.0
(
defaultPrim = "SaltBox"
)
def "SaltBox" (
variants = {
string materials = "renderHigh"
}
prepend variantSets = "materials"
)
{
variantSet "materials" = {
"renderHigh" (
prepend payload = @./renderHigh/material_renderHigh.usda@
) {
} ... |
omniverse-code/kit/exts/omni.kit.widget.layers/data/tests/ColorsSaltBox/material/renderLow/material_renderLow.usda | #usda 1.0
(
defaultPrim = "SaltBox"
)
def "SaltBox"
{
def Scope "Looks"
{
uniform token purpose = "render"
def Material "SaltBox_Paper1"
{
token outputs:mdl:surface.connect = </SaltBox/Looks/SaltBox_Paper1/Shader.outputs:out>
def Shader "Shader" (
... |
omniverse-code/kit/exts/omni.kit.widget.layers/data/tests/ColorsSaltBox/material/renderHigh/material_renderHigh.usda | #usda 1.0
(
defaultPrim = "SaltBox"
)
def "SaltBox"
{
def Scope "Looks"
{
uniform token purpose = "render"
def Material "SaltBox_Paper1"
{
token outputs:mdl:surface.connect = </SaltBox/Looks/SaltBox_Paper1/Shader.outputs:out>
def Shader "Shader" (
... |
omniverse-code/kit/exts/omni.kit.pip_archive/omni/kit/pip_archive/__init__.py | |
omniverse-code/kit/exts/omni.kit.pip_archive/omni/kit/pip_archive/tests/__init__.py | from .test_pip_archive import *
|
omniverse-code/kit/exts/omni.kit.pip_archive/omni/kit/pip_archive/tests/test_pip_archive.py | import omni.kit.test
import omni.kit.pipapi
class TestPipArchive(omni.kit.test.AsyncTestCase):
async def test_pip_archive(self):
# Take one of packages from deps/pip.toml, it should be prebundled and available without need for going into online index
omni.kit.pipapi.install("numpy", version="1.19.... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/_pyrsistent_version.py | __version__ = '0.19.3'
|
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/packages_list.txt | Pillow-9.2.0
aiodns-2.0.0
aiofiles-0.4.0
aioitertools-0.7.1
aiosignal-1.3.1
asteval-0.9.21
async_timeout-4.0.2
attrs-20.1.0
botocore-1.20.49
cchardet-2.1.6
charset_normalizer-2.1.1
click-8.1.3
coverage-6.1.2
fastapi-0.92.0
frozenlist-1.3.3
httptools-0.4.0
idna-3.4
idna-ssl-1.1.0
jsonschema-3.2.0
multidict-6.0.4
numpy-1... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/png.py | #!/usr/bin/env python
# png.py - PNG encoder/decoder in pure Python
#
# Copyright (C) 2006 Johann C. Rocholl <johann@browsershots.org>
# Portions Copyright (C) 2009 David Jones <drj@pobox.com>
# And probably portions Copyright (C) 2006 Nicko van Someren <nicko@nicko.org>
#
# Original concept by Johann C. Rocholl.
#
# ... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/six.py | # Copyright (c) 2010-2020 Benjamin Peterson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publi... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/idna_ssl.py | import ssl
import sys
import idna
__version__ = '1.1.0'
real_match_hostname = ssl.match_hostname
PY_370 = sys.version_info >= (3, 7, 0)
def patched_match_hostname(cert, hostname):
try:
hostname = idna.encode(hostname, uts46=True).decode('ascii')
except UnicodeError:
hostname = hostname.enc... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/PIP-LICENSES.txt | Pillow-9.2.0
------------
The Python Imaging Library (PIL) is
Copyright © 1997-2011 by Secret Labs AB
Copyright © 1995-2011 by Fredrik Lundh
Pillow is the friendly PIL fork. It is
Copyright © 2010-2022 by Alex Clark and contributors
Like PIL, Pillow is licensed under the open source HPND License:
By ob... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/typing_extensions.py | import abc
import collections
import contextlib
import sys
import typing
import collections.abc as collections_abc
import operator
# These are used by Protocol implementation
# We use internal typing helpers here, but this significantly reduces
# code duplication. (Also this is only until Protocol is in typing.)
from ... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/_pytesttester.pyi | from collections.abc import Iterable
from typing import Literal as L
__all__: list[str]
class PytestTester:
module_name: str
def __init__(self, module_name: str) -> None: ...
def __call__(
self,
label: L["fast", "full"] = ...,
verbose: int = ...,
extra_argv: None | Iterable... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/ctypeslib.pyi | # NOTE: Numpy's mypy plugin is used for importing the correct
# platform-specific `ctypes._SimpleCData[int]` sub-type
from ctypes import c_int64 as _c_intp
import os
import sys
import ctypes
from collections.abc import Iterable, Sequence
from typing import (
Literal as L,
Any,
Union,
TypeVar,
Gener... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/_version.py |
# This file was generated by 'versioneer.py' (0.19) from
# revision-control system data, or from the parent directory name of an
# unpacked source archive. Distribution tarballs contain a pre-generated copy
# of this file.
import json
version_json = '''
{
"date": "2022-11-19T15:26:06-0600",
"dirty": false,
"error... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/matlib.py | import warnings
# 2018-05-29, PendingDeprecationWarning added to matrix.__new__
# 2020-01-23, numpy 1.19.0 PendingDeprecatonWarning
warnings.warn("Importing from numpy.matlib is deprecated since 1.19.0. "
"The matrix subclass is not the recommended way to represent "
"matrices or deal with ... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/_distributor_init.py |
'''
Helper to preload windows dlls to prevent dll not found errors.
Once a DLL is preloaded, its namespace is made available to any
subsequent DLL. This file originated in the numpy-wheels repo,
and is created as part of the scripts that build the wheel.
'''
import os
import glob
if os.name == 'nt':
# convention f... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/_pytesttester.py | """
Pytest test running.
This module implements the ``test()`` function for NumPy modules. The usual
boiler plate for doing that is to put the following in the module
``__init__.py`` file::
from numpy._pytesttester import PytestTester
test = PytestTester(__name__)
del PytestTester
Warnings filtering and... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/ctypeslib.py | """
============================
``ctypes`` Utility Functions
============================
See Also
--------
load_library : Load a C library.
ndpointer : Array restype/argtype with verification.
as_ctypes : Create a ctypes array from an ndarray.
as_array : Create an ndarray from a ctypes array.
References
----------
... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/__init__.py | """
NumPy
=====
Provides
1. An array object of arbitrary homogeneous items
2. Fast mathematical operations over arrays
3. Linear Algebra, Fourier Transforms, Random Number Generation
How to use the documentation
----------------------------
Documentation is available in two forms: docstrings provided
with the c... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/version.py | from __future__ import annotations
from ._version import get_versions
__ALL__ = ['version', '__version__', 'full_version', 'git_revision', 'release']
vinfo: dict[str, str] = get_versions()
version = vinfo["version"]
__version__ = vinfo.get("closest-tag", vinfo["version"])
full_version = vinfo['version']
git_revision... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/setup.py | #!/usr/bin/env python3
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('numpy', parent_package, top_path)
config.add_subpackage('array_api')
config.add_subpackage('compat')
config.add_subpackage('core')
config.add_s... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/dual.py | """
.. deprecated:: 1.20
*This module is deprecated. Instead of importing functions from*
``numpy.dual``, *the functions should be imported directly from NumPy
or SciPy*.
Aliases for functions which may be accelerated by SciPy.
SciPy_ can be built to use accelerated or otherwise improved libraries
for FFTs, linear ... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/LICENSE.txt | Copyright (c) 2005-2022, NumPy Developers.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/_globals.py | """
Module defining global singleton classes.
This module raises a RuntimeError if an attempt to reload it is made. In that
way the identities of the classes defined here are fixed and will remain so
even if numpy itself is reloaded. In particular, a function like the following
will still work correctly after numpy is... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/conftest.py | """
Pytest configuration and fixtures for the Numpy test suite.
"""
import os
import tempfile
import hypothesis
import pytest
import numpy
from numpy.core._multiarray_tests import get_fpu_mode
_old_fpu_mode = None
_collect_results = {}
# Use a known and persistent tmpdir for hypothesis' caches, which
# can be auto... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/__init__.pyi | import builtins
import os
import sys
import mmap
import ctypes as ct
import array as _array
import datetime as dt
import enum
from abc import abstractmethod
from types import TracebackType, MappingProxyType
from contextlib import ContextDecorator
if sys.version_info >= (3, 9):
from types import GenericAlias
from ... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/__config__.py | # This file is generated by numpy's setup.py
# It contains system_info results at the time of building this package.
__all__ = ["get_info","show"]
import os
import sys
extra_dll_dir = os.path.join(os.path.dirname(__file__), '.libs')
if sys.platform == 'win32' and os.path.isdir(extra_dll_dir):
os.add_dll_directo... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/random/_philox.pyi | from typing import Any, TypedDict
from numpy import dtype, ndarray, uint64
from numpy.random.bit_generator import BitGenerator, SeedSequence
from numpy._typing import _ArrayLikeInt_co
class _PhiloxInternal(TypedDict):
counter: ndarray[Any, dtype[uint64]]
key: ndarray[Any, dtype[uint64]]
class _PhiloxState(Ty... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/random/_mt19937.pyi | from typing import Any, TypedDict
from numpy import dtype, ndarray, uint32
from numpy.random.bit_generator import BitGenerator, SeedSequence
from numpy._typing import _ArrayLikeInt_co
class _MT19937Internal(TypedDict):
key: ndarray[Any, dtype[uint32]]
pos: int
class _MT19937State(TypedDict):
bit_generato... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/random/bit_generator.pyi | import abc
from threading import Lock
from collections.abc import Callable, Mapping, Sequence
from typing import (
Any,
NamedTuple,
TypedDict,
TypeVar,
Union,
overload,
Literal,
)
from numpy import dtype, ndarray, uint32, uint64
from numpy._typing import _ArrayLikeInt_co, _ShapeLike, _Suppo... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/random/_generator.pyi | from collections.abc import Callable
from typing import Any, Union, overload, TypeVar, Literal
from numpy import (
bool_,
dtype,
float32,
float64,
int8,
int16,
int32,
int64,
int_,
ndarray,
uint,
uint8,
uint16,
uint32,
uint64,
)
from numpy.random import BitGen... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/random/__init__.py | """
========================
Random Number Generation
========================
Use ``default_rng()`` to create a `Generator` and call its methods.
=============== =========================================================
Generator
--------------- ---------------------------------------------------------
Generator ... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/random/_pickle.py | from .mtrand import RandomState
from ._philox import Philox
from ._pcg64 import PCG64, PCG64DXSM
from ._sfc64 import SFC64
from ._generator import Generator
from ._mt19937 import MT19937
BitGenerators = {'MT19937': MT19937,
'PCG64': PCG64,
'PCG64DXSM': PCG64DXSM,
'Ph... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/random/setup.py | import os
import platform
import sys
from os.path import join
from numpy.distutils.system_info import platform_bits
is_msvc = (platform.platform().startswith('Windows') and
platform.python_compiler().startswith('MS'))
def configuration(parent_package='', top_path=None):
from numpy.distutils.misc_util... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/random/_pcg64.pyi | from typing import TypedDict
from numpy.random.bit_generator import BitGenerator, SeedSequence
from numpy._typing import _ArrayLikeInt_co
class _PCG64Internal(TypedDict):
state: int
inc: int
class _PCG64State(TypedDict):
bit_generator: str
state: _PCG64Internal
has_uint32: int
uinteger: int
... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/random/__init__.pyi | from numpy._pytesttester import PytestTester
from numpy.random._generator import Generator as Generator
from numpy.random._generator import default_rng as default_rng
from numpy.random._mt19937 import MT19937 as MT19937
from numpy.random._pcg64 import (
PCG64 as PCG64,
PCG64DXSM as PCG64DXSM,
)
from numpy.rand... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/random/mtrand.pyi | from collections.abc import Callable
from typing import Any, Union, overload, Literal
from numpy import (
bool_,
dtype,
float32,
float64,
int8,
int16,
int32,
int64,
int_,
ndarray,
uint,
uint8,
uint16,
uint32,
uint64,
)
from numpy.random.bit_generator import B... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/random/_sfc64.pyi | from typing import Any, TypedDict
from numpy import dtype as dtype
from numpy import ndarray as ndarray
from numpy import uint64
from numpy.random.bit_generator import BitGenerator, SeedSequence
from numpy._typing import _ArrayLikeInt_co
class _SFC64Internal(TypedDict):
state: ndarray[Any, dtype[uint64]]
class _... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/random/tests/test_random.py | import warnings
import pytest
import numpy as np
from numpy.testing import (
assert_, assert_raises, assert_equal, assert_warns,
assert_no_warnings, assert_array_equal, assert_array_almost_equal,
suppress_warnings
)
from numpy import random
import sys
class TestSeed:
def test_sca... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/random/tests/test_extending.py | import os
import pytest
import shutil
import subprocess
import sys
import warnings
import numpy as np
from numpy.distutils.misc_util import exec_mod_from_location
try:
import cffi
except ImportError:
cffi = None
if sys.flags.optimize > 1:
# no docstrings present to inspect when PYTHONOPTIMIZE/Py_OptimizeF... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/random/tests/test_regression.py | import sys
from numpy.testing import (
assert_, assert_array_equal, assert_raises,
)
from numpy import random
import numpy as np
class TestRegression:
def test_VonMises_range(self):
# Make sure generated random variables are in [-pi, pi].
# Regression test for ticket #986.
for mu ... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/random/tests/test_randomstate_regression.py | import sys
import pytest
from numpy.testing import (
assert_, assert_array_equal, assert_raises,
)
import numpy as np
from numpy import random
class TestRegression:
def test_VonMises_range(self):
# Make sure generated random variables are in [-pi, pi].
# Regression test for ticket #986... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/random/tests/__init__.py | |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/random/tests/test_randomstate.py | import hashlib
import pickle
import sys
import warnings
import numpy as np
import pytest
from numpy.testing import (
assert_, assert_raises, assert_equal, assert_warns,
assert_no_warnings, assert_array_equal, assert_array_almost_equal,
suppress_warnings
)
from numpy.random import MT199... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/random/tests/test_generator_mt19937_regressions.py | from numpy.testing import (assert_, assert_array_equal)
import numpy as np
import pytest
from numpy.random import Generator, MT19937
mt19937 = Generator(MT19937())
class TestRegression:
def test_vonmises_range(self):
# Make sure generated random variables are in [-pi, pi].
# Regression test for ... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/random/tests/test_direct.py | import os
from os.path import join
import sys
import numpy as np
from numpy.testing import (assert_equal, assert_allclose, assert_array_equal,
assert_raises)
import pytest
from numpy.random import (
Generator, MT19937, PCG64, PCG64DXSM, Philox, RandomState, SeedSequence,
SFC64, defa... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/random/tests/test_smoke.py | import pickle
from functools import partial
import numpy as np
import pytest
from numpy.testing import assert_equal, assert_, assert_array_equal
from numpy.random import (Generator, MT19937, PCG64, PCG64DXSM, Philox, SFC64)
@pytest.fixture(scope='module',
params=(np.bool_, np.int8, np.int16, np.int32,... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/random/tests/test_seed_sequence.py | import numpy as np
from numpy.testing import assert_array_equal, assert_array_compare
from numpy.random import SeedSequence
def test_reference_data():
""" Check that SeedSequence generates data the same as the C++ reference.
https://gist.github.com/imneme/540829265469e673d045
"""
inputs = [
... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/random/tests/test_generator_mt19937.py | import sys
import hashlib
import pytest
import numpy as np
from numpy.linalg import LinAlgError
from numpy.testing import (
assert_, assert_raises, assert_equal, assert_allclose,
assert_warns, assert_no_warnings, assert_array_equal,
assert_array_almost_equal, suppress_warnings)
from numpy.random import G... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/random/tests/data/__init__.py | |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/random/_examples/cython/setup.py | #!/usr/bin/env python3
"""
Build the Cython demonstrations of low-level access to NumPy random
Usage: python setup.py build_ext -i
"""
from os.path import dirname, join, abspath
from setuptools import setup
from setuptools.extension import Extension
import numpy as np
from Cython.Build import cythonize
path = dirn... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/random/_examples/cffi/extending.py | """
Use cffi to access any of the underlying C functions from distributions.h
"""
import os
import numpy as np
import cffi
from .parse import parse_distributions_h
ffi = cffi.FFI()
inc_dir = os.path.join(np.get_include(), 'numpy')
# Basic numpy types
ffi.cdef('''
typedef intptr_t npy_intp;
typedef unsigned ch... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/random/_examples/cffi/parse.py | import os
def parse_distributions_h(ffi, inc_dir):
"""
Parse distributions.h located in inc_dir for CFFI, filling in the ffi.cdef
Read the function declarations without the "#define ..." macros that will
be filled in when loading the library.
"""
with open(os.path.join(inc_dir, 'random', 'bi... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/random/_examples/numba/extending.py | import numpy as np
import numba as nb
from numpy.random import PCG64
from timeit import timeit
bit_gen = PCG64()
next_d = bit_gen.cffi.next_double
state_addr = bit_gen.cffi.state_address
def normals(n, state):
out = np.empty(n)
for i in range((n + 1) // 2):
x1 = 2.0 * next_d(state) - 1.0
x2 =... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/random/_examples/numba/extending_distributions.py | r"""
Building the required library in this example requires a source distribution
of NumPy or clone of the NumPy git repository since distributions.c is not
included in binary distributions.
On *nix, execute in numpy/random/src/distributions
export ${PYTHON_VERSION}=3.8 # Python version
export PYTHON_INCLUDE=#path to... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/typing/__init__.py | """
============================
Typing (:mod:`numpy.typing`)
============================
.. versionadded:: 1.20
Large parts of the NumPy API have PEP-484-style type annotations. In
addition a number of type aliases are available to users, most prominently
the two below:
- `ArrayLike`: objects that can be converted... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/typing/setup.py | def configuration(parent_package='', top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('typing', parent_package, top_path)
config.add_subpackage('tests')
config.add_data_dir('tests/data')
return config
if __name__ == '__main__':
from numpy.distutils.cor... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/typing/mypy_plugin.py | """A mypy_ plugin for managing a number of platform-specific annotations.
Its functionality can be split into three distinct parts:
* Assigning the (platform-dependent) precisions of certain `~numpy.number`
subclasses, including the likes of `~numpy.int_`, `~numpy.intp` and
`~numpy.longlong`. See the documentation... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/typing/tests/test_runtime.py | """Test the runtime usage of `numpy.typing`."""
from __future__ import annotations
import sys
from typing import (
get_type_hints,
Union,
NamedTuple,
get_args,
get_origin,
Any,
)
import pytest
import numpy as np
import numpy.typing as npt
import numpy._typing as _npt
class TypeTup(NamedTupl... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/typing/tests/test_generic_alias.py | from __future__ import annotations
import sys
import copy
import types
import pickle
import weakref
from typing import TypeVar, Any, Union, Callable
import pytest
import numpy as np
from numpy._typing._generic_alias import _GenericAlias
from typing_extensions import Unpack
ScalarType = TypeVar("ScalarType", bound=np... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/typing/tests/__init__.py | |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/typing/tests/test_isfile.py | import os
from pathlib import Path
import numpy as np
from numpy.testing import assert_
ROOT = Path(np.__file__).parents[0]
FILES = [
ROOT / "py.typed",
ROOT / "__init__.pyi",
ROOT / "ctypeslib.pyi",
ROOT / "core" / "__init__.pyi",
ROOT / "distutils" / "__init__.pyi",
ROOT / "f2py" / "__init__... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/typing/tests/test_typing.py | from __future__ import annotations
import importlib.util
import itertools
import os
import re
import shutil
from collections import defaultdict
from collections.abc import Iterator
from typing import IO, TYPE_CHECKING
import pytest
import numpy as np
import numpy.typing as npt
from numpy.typing.mypy_plugin import (
... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/typing/tests/data/misc/extended_precision.pyi | import numpy as np
reveal_type(np.uint128())
reveal_type(np.uint256())
reveal_type(np.int128())
reveal_type(np.int256())
reveal_type(np.float80())
reveal_type(np.float96())
reveal_type(np.float128())
reveal_type(np.float256())
reveal_type(np.complex160())
reveal_type(np.complex192())
reveal_type(np.complex256())
re... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/typing/tests/data/pass/multiarray.py | import numpy as np
import numpy.typing as npt
AR_f8: npt.NDArray[np.float64] = np.array([1.0])
AR_i4 = np.array([1], dtype=np.int32)
AR_u1 = np.array([1], dtype=np.uint8)
AR_LIKE_f = [1.5]
AR_LIKE_i = [1]
b_f8 = np.broadcast(AR_f8)
b_i4_f8_f8 = np.broadcast(AR_i4, AR_f8, AR_f8)
next(b_f8)
b_f8.reset()
b_f8.index
b_... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/typing/tests/data/pass/array_like.py | from __future__ import annotations
from typing import Any
import numpy as np
from numpy._typing import ArrayLike, _SupportsArray
x1: ArrayLike = True
x2: ArrayLike = 5
x3: ArrayLike = 1.0
x4: ArrayLike = 1 + 1j
x5: ArrayLike = np.int8(1)
x6: ArrayLike = np.float64(1)
x7: ArrayLike = np.complex128(1)
x8: ArrayLike = ... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/typing/tests/data/pass/dtype.py | import numpy as np
dtype_obj = np.dtype(np.str_)
void_dtype_obj = np.dtype([("f0", np.float64), ("f1", np.float32)])
np.dtype(dtype=np.int64)
np.dtype(int)
np.dtype("int")
np.dtype(None)
np.dtype((int, 2))
np.dtype((int, (1,)))
np.dtype({"names": ["a", "b"], "formats": [int, float]})
np.dtype({"names": ["a"], "form... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/typing/tests/data/pass/lib_utils.py | from __future__ import annotations
from io import StringIO
import numpy as np
FILE = StringIO()
AR = np.arange(10, dtype=np.float64)
def func(a: int) -> bool: ...
np.deprecate(func)
np.deprecate()
np.deprecate_with_doc("test")
np.deprecate_with_doc(None)
np.byte_bounds(AR)
np.byte_bounds(np.float64())
np.info(1... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/typing/tests/data/pass/ufunclike.py | from __future__ import annotations
from typing import Any
import numpy as np
class Object:
def __ceil__(self) -> Object:
return self
def __floor__(self) -> Object:
return self
def __ge__(self, value: object) -> bool:
return True
def __array__(self) -> np.ndarray[Any, np.dtyp... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/typing/tests/data/pass/index_tricks.py | from __future__ import annotations
from typing import Any
import numpy as np
AR_LIKE_b = [[True, True], [True, True]]
AR_LIKE_i = [[1, 2], [3, 4]]
AR_LIKE_f = [[1.0, 2.0], [3.0, 4.0]]
AR_LIKE_U = [["1", "2"], ["3", "4"]]
AR_i8: np.ndarray[Any, np.dtype[np.int64]] = np.array(AR_LIKE_i, dtype=np.int64)
np.ndenumerate(... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/typing/tests/data/pass/literal.py | from __future__ import annotations
from functools import partial
from collections.abc import Callable
import pytest # type: ignore
import numpy as np
AR = np.array(0)
AR.setflags(write=False)
KACF = frozenset({None, "K", "A", "C", "F"})
ACF = frozenset({None, "A", "C", "F"})
CF = frozenset({None, "C", "F"})
order... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/typing/tests/data/pass/ufunc_config.py | """Typing tests for `numpy.core._ufunc_config`."""
import numpy as np
def func1(a: str, b: int) -> None: ...
def func2(a: str, b: int, c: float = ...) -> None: ...
def func3(a: str, b: int) -> int: ...
class Write1:
def write(self, a: str) -> None: ...
class Write2:
def write(self, a: str, b: int = ...) -> ... |
omniverse-code/kit/exts/omni.kit.pip_archive/pip_prebundle/numpy/typing/tests/data/pass/ndarray_shape_manipulation.py | import numpy as np
nd1 = np.array([[1, 2], [3, 4]])
# reshape
nd1.reshape(4)
nd1.reshape(2, 2)
nd1.reshape((2, 2))
nd1.reshape((2, 2), order="C")
nd1.reshape(4, order="C")
# resize
nd1.resize()
nd1.resize(4)
nd1.resize(2, 2)
nd1.resize((2, 2))
nd1.resize((2, 2), refcheck=True)
nd1.resize(4, refcheck=True)
nd2 = n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.