Current Path: > > opt > cloudlinux > venv > lib64 > python3.11 > > site-packages > numpy > core
Operation : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 Software : Apache Server IP : 162.0.232.56 | Your IP: 216.73.216.111 Domains : 1034 Domain(s) Permission : [ 0755 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
__pycache__ | Directory | - | - | |
include | Directory | - | - | |
lib | Directory | - | - | |
tests | Directory | - | - | |
__init__.py | File | 5779 bytes | April 17 2025 13:10:58. | |
__init__.pyi | File | 126 bytes | April 17 2025 13:10:58. | |
_add_newdocs.py | File | 208972 bytes | April 17 2025 13:10:58. | |
_add_newdocs_scalars.py | File | 12106 bytes | April 17 2025 13:10:58. | |
_asarray.py | File | 3884 bytes | April 17 2025 13:10:58. | |
_asarray.pyi | File | 1086 bytes | April 17 2025 13:10:58. | |
_dtype.py | File | 10606 bytes | April 17 2025 13:10:58. | |
_dtype_ctypes.py | File | 3673 bytes | April 17 2025 13:10:58. | |
_exceptions.py | File | 5379 bytes | April 17 2025 13:10:58. | |
_internal.py | File | 28348 bytes | April 17 2025 13:10:58. | |
_internal.pyi | File | 1032 bytes | April 17 2025 13:10:58. | |
_machar.py | File | 11565 bytes | April 17 2025 13:10:58. | |
_methods.py | File | 8613 bytes | April 17 2025 13:10:58. | |
_multiarray_tests.cpython-311-x86_64-linux-gnu.so | File | 175512 bytes | April 17 2025 13:11:30. | |
_multiarray_umath.cpython-311-x86_64-linux-gnu.so | File | 6959064 bytes | April 17 2025 13:11:30. | |
_operand_flag_tests.cpython-311-x86_64-linux-gnu.so | File | 16944 bytes | April 17 2025 13:11:30. | |
_rational_tests.cpython-311-x86_64-linux-gnu.so | File | 59688 bytes | April 17 2025 13:11:30. | |
_simd.cpython-311-x86_64-linux-gnu.so | File | 2586024 bytes | April 17 2025 13:11:30. | |
_string_helpers.py | File | 2852 bytes | April 17 2025 13:10:58. | |
_struct_ufunc_tests.cpython-311-x86_64-linux-gnu.so | File | 17048 bytes | April 17 2025 13:11:30. | |
_type_aliases.py | File | 7534 bytes | April 17 2025 13:10:58. | |
_type_aliases.pyi | File | 404 bytes | April 17 2025 13:10:58. | |
_ufunc_config.py | File | 13944 bytes | April 17 2025 13:10:58. | |
_ufunc_config.pyi | File | 1066 bytes | April 17 2025 13:10:58. | |
_umath_tests.cpython-311-x86_64-linux-gnu.so | File | 41992 bytes | April 17 2025 13:11:30. | |
arrayprint.py | File | 63608 bytes | April 17 2025 13:10:58. | |
arrayprint.pyi | File | 4428 bytes | April 17 2025 13:10:58. | |
cversions.py | File | 347 bytes | April 17 2025 13:10:58. | |
defchararray.py | File | 73617 bytes | April 17 2025 13:10:58. | |
defchararray.pyi | File | 9216 bytes | April 17 2025 13:10:58. | |
einsumfunc.py | File | 51868 bytes | April 17 2025 13:10:58. | |
einsumfunc.pyi | File | 4860 bytes | April 17 2025 13:10:58. | |
fromnumeric.py | File | 128821 bytes | April 17 2025 13:10:58. | |
fromnumeric.pyi | File | 23510 bytes | April 17 2025 13:10:58. | |
function_base.py | File | 19836 bytes | April 17 2025 13:10:58. | |
function_base.pyi | File | 4725 bytes | April 17 2025 13:10:58. | |
generate_numpy_api.py | File | 7654 bytes | April 17 2025 13:10:58. | |
getlimits.py | File | 25865 bytes | April 17 2025 13:10:58. | |
getlimits.pyi | File | 82 bytes | April 17 2025 13:10:58. | |
memmap.py | File | 11771 bytes | April 17 2025 13:10:58. | |
memmap.pyi | File | 55 bytes | April 17 2025 13:10:58. | |
multiarray.py | File | 56097 bytes | April 17 2025 13:10:58. | |
multiarray.pyi | File | 24768 bytes | April 17 2025 13:10:58. | |
numeric.py | File | 77014 bytes | April 17 2025 13:10:58. | |
numeric.pyi | File | 14230 bytes | April 17 2025 13:10:58. | |
numerictypes.py | File | 18098 bytes | April 17 2025 13:10:58. | |
numerictypes.pyi | File | 3267 bytes | April 17 2025 13:10:58. | |
overrides.py | File | 7093 bytes | April 17 2025 13:10:58. | |
records.py | File | 37533 bytes | April 17 2025 13:10:58. | |
records.pyi | File | 5692 bytes | April 17 2025 13:10:58. | |
setup.py | File | 48182 bytes | April 17 2025 13:10:58. | |
setup_common.py | File | 17085 bytes | April 17 2025 13:10:58. | |
shape_base.py | File | 29743 bytes | April 17 2025 13:10:58. | |
shape_base.pyi | File | 2774 bytes | April 17 2025 13:10:58. | |
umath.py | File | 2040 bytes | April 17 2025 13:10:58. | |
umath_tests.py | File | 389 bytes | April 17 2025 13:10:58. |
""" Various richly-typed exceptions, that also help us deal with string formatting in python where it's easier. By putting the formatting in `__str__`, we also avoid paying the cost for users who silence the exceptions. """ from .._utils import set_module def _unpack_tuple(tup): if len(tup) == 1: return tup[0] else: return tup def _display_as_base(cls): """ A decorator that makes an exception class look like its base. We use this to hide subclasses that are implementation details - the user should catch the base type, which is what the traceback will show them. Classes decorated with this decorator are subject to removal without a deprecation warning. """ assert issubclass(cls, Exception) cls.__name__ = cls.__base__.__name__ return cls class UFuncTypeError(TypeError): """ Base class for all ufunc exceptions """ def __init__(self, ufunc): self.ufunc = ufunc @_display_as_base class _UFuncNoLoopError(UFuncTypeError): """ Thrown when a ufunc loop cannot be found """ def __init__(self, ufunc, dtypes): super().__init__(ufunc) self.dtypes = tuple(dtypes) def __str__(self): return ( "ufunc {!r} did not contain a loop with signature matching types " "{!r} -> {!r}" ).format( self.ufunc.__name__, _unpack_tuple(self.dtypes[:self.ufunc.nin]), _unpack_tuple(self.dtypes[self.ufunc.nin:]) ) @_display_as_base class _UFuncBinaryResolutionError(_UFuncNoLoopError): """ Thrown when a binary resolution fails """ def __init__(self, ufunc, dtypes): super().__init__(ufunc, dtypes) assert len(self.dtypes) == 2 def __str__(self): return ( "ufunc {!r} cannot use operands with types {!r} and {!r}" ).format( self.ufunc.__name__, *self.dtypes ) @_display_as_base class _UFuncCastingError(UFuncTypeError): def __init__(self, ufunc, casting, from_, to): super().__init__(ufunc) self.casting = casting self.from_ = from_ self.to = to @_display_as_base class _UFuncInputCastingError(_UFuncCastingError): """ Thrown when a ufunc input cannot be casted """ def __init__(self, ufunc, casting, from_, to, i): super().__init__(ufunc, casting, from_, to) self.in_i = i def __str__(self): # only show the number if more than one input exists i_str = "{} ".format(self.in_i) if self.ufunc.nin != 1 else "" return ( "Cannot cast ufunc {!r} input {}from {!r} to {!r} with casting " "rule {!r}" ).format( self.ufunc.__name__, i_str, self.from_, self.to, self.casting ) @_display_as_base class _UFuncOutputCastingError(_UFuncCastingError): """ Thrown when a ufunc output cannot be casted """ def __init__(self, ufunc, casting, from_, to, i): super().__init__(ufunc, casting, from_, to) self.out_i = i def __str__(self): # only show the number if more than one output exists i_str = "{} ".format(self.out_i) if self.ufunc.nout != 1 else "" return ( "Cannot cast ufunc {!r} output {}from {!r} to {!r} with casting " "rule {!r}" ).format( self.ufunc.__name__, i_str, self.from_, self.to, self.casting ) @_display_as_base class _ArrayMemoryError(MemoryError): """ Thrown when an array cannot be allocated""" def __init__(self, shape, dtype): self.shape = shape self.dtype = dtype @property def _total_size(self): num_bytes = self.dtype.itemsize for dim in self.shape: num_bytes *= dim return num_bytes @staticmethod def _size_to_string(num_bytes): """ Convert a number of bytes into a binary size string """ # https://en.wikipedia.org/wiki/Binary_prefix LOG2_STEP = 10 STEP = 1024 units = ['bytes', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB'] unit_i = max(num_bytes.bit_length() - 1, 1) // LOG2_STEP unit_val = 1 << (unit_i * LOG2_STEP) n_units = num_bytes / unit_val del unit_val # ensure we pick a unit that is correct after rounding if round(n_units) == STEP: unit_i += 1 n_units /= STEP # deal with sizes so large that we don't have units for them if unit_i >= len(units): new_unit_i = len(units) - 1 n_units *= 1 << ((unit_i - new_unit_i) * LOG2_STEP) unit_i = new_unit_i unit_name = units[unit_i] # format with a sensible number of digits if unit_i == 0: # no decimal point on bytes return '{:.0f} {}'.format(n_units, unit_name) elif round(n_units) < 1000: # 3 significant figures, if none are dropped to the left of the . return '{:#.3g} {}'.format(n_units, unit_name) else: # just give all the digits otherwise return '{:#.0f} {}'.format(n_units, unit_name) def __str__(self): size_str = self._size_to_string(self._total_size) return ( "Unable to allocate {} for an array with shape {} and data type {}" .format(size_str, self.shape, self.dtype) )
SILENT KILLER Tool