Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.47
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
lib /
python3 /
dist-packages /
numpy /
core /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
include
[ DIR ]
drwxr-xr-x
lib
[ DIR ]
drwxr-xr-x
tests
[ DIR ]
drwxr-xr-x
__init__.py
5.24
KB
-rw-r--r--
__init__.pyi
126
B
-rw-r--r--
_add_newdocs.py
187.41
KB
-rw-r--r--
_add_newdocs_scalars.py
8.59
KB
-rw-r--r--
_asarray.py
4.08
KB
-rw-r--r--
_asarray.pyi
1.89
KB
-rw-r--r--
_dtype.py
9.61
KB
-rw-r--r--
_dtype_ctypes.py
3.59
KB
-rw-r--r--
_exceptions.py
5.99
KB
-rw-r--r--
_internal.py
26.73
KB
-rw-r--r--
_internal.pyi
1.34
KB
-rw-r--r--
_methods.py
10.54
KB
-rw-r--r--
_multiarray_tests.cpython-310-...
122.6
KB
-rw-r--r--
_multiarray_umath.cpython-310-...
3.63
MB
-rw-r--r--
_operand_flag_tests.cpython-31...
14.2
KB
-rw-r--r--
_rational_tests.cpython-310-x8...
43.46
KB
-rw-r--r--
_simd.cpython-310-x86_64-linux...
1.91
MB
-rw-r--r--
_string_helpers.py
2.79
KB
-rw-r--r--
_struct_ufunc_tests.cpython-31...
14.38
KB
-rw-r--r--
_type_aliases.py
7.1
KB
-rw-r--r--
_type_aliases.pyi
520
B
-rw-r--r--
_ufunc_config.py
13.07
KB
-rw-r--r--
_ufunc_config.pyi
1.22
KB
-rw-r--r--
_umath_tests.cpython-310-x86_6...
34.8
KB
-rw-r--r--
arrayprint.py
60.18
KB
-rw-r--r--
arrayprint.pyi
4.56
KB
-rw-r--r--
cversions.py
347
B
-rw-r--r--
defchararray.py
68.1
KB
-rw-r--r--
einsumfunc.py
50.24
KB
-rw-r--r--
einsumfunc.pyi
3.62
KB
-rw-r--r--
fromnumeric.py
119.9
KB
-rw-r--r--
fromnumeric.pyi
7.83
KB
-rw-r--r--
function_base.py
18.57
KB
-rw-r--r--
function_base.pyi
1.44
KB
-rw-r--r--
generate_numpy_api.py
6.94
KB
-rw-r--r--
getlimits.py
19.31
KB
-rw-r--r--
machar.py
10.56
KB
-rw-r--r--
memmap.py
11.41
KB
-rw-r--r--
multiarray.py
54.01
KB
-rw-r--r--
numeric.py
74.93
KB
-rw-r--r--
numeric.pyi
4.76
KB
-rw-r--r--
numerictypes.py
16.91
KB
-rw-r--r--
numerictypes.pyi
2.85
KB
-rw-r--r--
overrides.py
7.94
KB
-rw-r--r--
records.py
36.58
KB
-rw-r--r--
setup.py
44.62
KB
-rw-r--r--
setup_common.py
19.31
KB
-rw-r--r--
shape_base.py
28.32
KB
-rw-r--r--
shape_base.pyi
1.04
KB
-rw-r--r--
umath.py
1.99
KB
-rw-r--r--
umath_tests.py
389
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : _type_aliases.py
""" Due to compatibility, numpy has a very large number of different naming conventions for the scalar types (those subclassing from `numpy.generic`). This file produces a convoluted set of dictionaries mapping names to types, and sometimes other mappings too. .. data:: allTypes A dictionary of names to types that will be exposed as attributes through ``np.core.numerictypes.*`` .. data:: sctypeDict Similar to `allTypes`, but maps a broader set of aliases to their types. .. data:: sctypes A dictionary keyed by a "type group" string, providing a list of types under that group. """ from numpy.compat import unicode from numpy.core._string_helpers import english_lower from numpy.core.multiarray import typeinfo, dtype from numpy.core._dtype import _kind_name sctypeDict = {} # Contains all leaf-node scalar types with aliases allTypes = {} # Collect the types we will add to the module # separate the actual type info from the abstract base classes _abstract_types = {} _concrete_typeinfo = {} for k, v in typeinfo.items(): # make all the keys lowercase too k = english_lower(k) if isinstance(v, type): _abstract_types[k] = v else: _concrete_typeinfo[k] = v _concrete_types = {v.type for k, v in _concrete_typeinfo.items()} def _bits_of(obj): try: info = next(v for v in _concrete_typeinfo.values() if v.type is obj) except StopIteration: if obj in _abstract_types.values(): msg = "Cannot count the bits of an abstract type" raise ValueError(msg) from None # some third-party type - make a best-guess return dtype(obj).itemsize * 8 else: return info.bits def bitname(obj): """Return a bit-width name for a given type object""" bits = _bits_of(obj) dt = dtype(obj) char = dt.kind base = _kind_name(dt) if base == 'object': bits = 0 if bits != 0: char = "%s%d" % (char, bits // 8) return base, bits, char def _add_types(): for name, info in _concrete_typeinfo.items(): # define C-name and insert typenum and typechar references also allTypes[name] = info.type sctypeDict[name] = info.type sctypeDict[info.char] = info.type sctypeDict[info.num] = info.type for name, cls in _abstract_types.items(): allTypes[name] = cls _add_types() # This is the priority order used to assign the bit-sized NPY_INTxx names, which # must match the order in npy_common.h in order for NPY_INTxx and np.intxx to be # consistent. # If two C types have the same size, then the earliest one in this list is used # as the sized name. _int_ctypes = ['long', 'longlong', 'int', 'short', 'byte'] _uint_ctypes = list('u' + t for t in _int_ctypes) def _add_aliases(): for name, info in _concrete_typeinfo.items(): # these are handled by _add_integer_aliases if name in _int_ctypes or name in _uint_ctypes: continue # insert bit-width version for this class (if relevant) base, bit, char = bitname(info.type) myname = "%s%d" % (base, bit) # ensure that (c)longdouble does not overwrite the aliases assigned to # (c)double if name in ('longdouble', 'clongdouble') and myname in allTypes: continue allTypes[myname] = info.type # add mapping for both the bit name and the numarray name sctypeDict[myname] = info.type # add forward, reverse, and string mapping to numarray sctypeDict[char] = info.type _add_aliases() def _add_integer_aliases(): seen_bits = set() for i_ctype, u_ctype in zip(_int_ctypes, _uint_ctypes): i_info = _concrete_typeinfo[i_ctype] u_info = _concrete_typeinfo[u_ctype] bits = i_info.bits # same for both for info, charname, intname in [ (i_info,'i%d' % (bits//8,), 'int%d' % bits), (u_info,'u%d' % (bits//8,), 'uint%d' % bits)]: if bits not in seen_bits: # sometimes two different types have the same number of bits # if so, the one iterated over first takes precedence allTypes[intname] = info.type sctypeDict[intname] = info.type sctypeDict[charname] = info.type seen_bits.add(bits) _add_integer_aliases() # We use these later void = allTypes['void'] # # Rework the Python names (so that float and complex and int are consistent # with Python usage) # def _set_up_aliases(): type_pairs = [('complex_', 'cdouble'), ('int0', 'intp'), ('uint0', 'uintp'), ('single', 'float'), ('csingle', 'cfloat'), ('singlecomplex', 'cfloat'), ('float_', 'double'), ('intc', 'int'), ('uintc', 'uint'), ('int_', 'long'), ('uint', 'ulong'), ('cfloat', 'cdouble'), ('longfloat', 'longdouble'), ('clongfloat', 'clongdouble'), ('longcomplex', 'clongdouble'), ('bool_', 'bool'), ('bytes_', 'string'), ('string_', 'string'), ('str_', 'unicode'), ('unicode_', 'unicode'), ('object_', 'object')] for alias, t in type_pairs: allTypes[alias] = allTypes[t] sctypeDict[alias] = sctypeDict[t] # Remove aliases overriding python types and modules to_remove = ['ulong', 'object', 'int', 'float', 'complex', 'bool', 'string', 'datetime', 'timedelta', 'bytes', 'str'] for t in to_remove: try: del allTypes[t] del sctypeDict[t] except KeyError: pass _set_up_aliases() sctypes = {'int': [], 'uint':[], 'float':[], 'complex':[], 'others':[bool, object, bytes, unicode, void]} def _add_array_type(typename, bits): try: t = allTypes['%s%d' % (typename, bits)] except KeyError: pass else: sctypes[typename].append(t) def _set_array_types(): ibytes = [1, 2, 4, 8, 16, 32, 64] fbytes = [2, 4, 8, 10, 12, 16, 32, 64] for bytes in ibytes: bits = 8*bytes _add_array_type('int', bits) _add_array_type('uint', bits) for bytes in fbytes: bits = 8*bytes _add_array_type('float', bits) _add_array_type('complex', 2*bits) _gi = dtype('p') if _gi.type not in sctypes['int']: indx = 0 sz = _gi.itemsize _lst = sctypes['int'] while (indx < len(_lst) and sz >= _lst[indx](0).itemsize): indx += 1 sctypes['int'].insert(indx, _gi.type) sctypes['uint'].insert(indx, dtype('P').type) _set_array_types() # Add additional strings to the sctypeDict _toadd = ['int', 'float', 'complex', 'bool', 'object', 'str', 'bytes', ('a', 'bytes_')] for name in _toadd: if isinstance(name, tuple): sctypeDict[name[0]] = allTypes[name[1]] else: sctypeDict[name] = allTypes['%s_' % name] del _toadd, name
Close