K ir(`dZddlmZmZmZmZmZmZmZm Z m Z m Z m Z m Z mZmZmZGddZy)z Array API Inspection namespace This is the namespace for inspection functions as defined by the array API standard. See https://data-apis.org/array-api/latest/API_specification/inspection.html for more details. )bool complex64 complex128dtypefloat32float64int8int16int32int64intpuint8uint16uint32uint64c@eZdZdZdZdZdZdddZdddd Zd Zy) __array_namespace_info__a Get the array API inspection namespace for NumPy. The array API inspection namespace defines the following functions: - capabilities() - default_device() - default_dtypes() - dtypes() - devices() See https://data-apis.org/array-api/latest/API_specification/inspection.html for more details. Returns ------- info : ModuleType The array API inspection namespace for NumPy. Examples -------- >>> info = np.__array_namespace_info__() >>> info.default_dtypes() {'real floating': numpy.float64, 'complex floating': numpy.complex128, 'integral': numpy.int64, 'indexing': numpy.int64} numpycddddS)a} Return a dictionary of array API library capabilities. The resulting dictionary has the following keys: - **"boolean indexing"**: boolean indicating whether an array library supports boolean indexing. Always ``True`` for NumPy. - **"data-dependent shapes"**: boolean indicating whether an array library supports data-dependent output shapes. Always ``True`` for NumPy. See https://data-apis.org/array-api/latest/API_specification/generated/array_api.info.capabilities.html for more details. See Also -------- __array_namespace_info__.default_device, __array_namespace_info__.default_dtypes, __array_namespace_info__.dtypes, __array_namespace_info__.devices Returns ------- capabilities : dict A dictionary of array API library capabilities. Examples -------- >>> info = np.__array_namespace_info__() >>> info.capabilities() {'boolean indexing': True, 'data-dependent shapes': True, 'max dimensions': 64} T@)zboolean indexingzdata-dependent shapeszmax dimensionsselfs [/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/numpy/_array_api_info.py capabilitiesz%__array_namespace_info__.capabilities?sN!%%)   cy)a< The default device used for new NumPy arrays. For NumPy, this always returns ``'cpu'``. See Also -------- __array_namespace_info__.capabilities, __array_namespace_info__.default_dtypes, __array_namespace_info__.dtypes, __array_namespace_info__.devices Returns ------- device : str The default device used for new NumPy arrays. Examples -------- >>> info = np.__array_namespace_info__() >>> info.default_device() 'cpu' cpurrs rdefault_devicez'__array_namespace_info__.default_deviceks2rN)devicec|dvrtd|ttttttttdS)as The default data types used for new NumPy arrays. For NumPy, this always returns the following dictionary: - **"real floating"**: ``numpy.float64`` - **"complex floating"**: ``numpy.complex128`` - **"integral"**: ``numpy.intp`` - **"indexing"**: ``numpy.intp`` Parameters ---------- device : str, optional The device to get the default data types for. For NumPy, only ``'cpu'`` is allowed. Returns ------- dtypes : dict A dictionary describing the default data types used for new NumPy arrays. See Also -------- __array_namespace_info__.capabilities, __array_namespace_info__.default_device, __array_namespace_info__.dtypes, __array_namespace_info__.devices Examples -------- >>> info = np.__array_namespace_info__() >>> info.default_dtypes() {'real floating': numpy.float64, 'complex floating': numpy.complex128, 'integral': numpy.int64, 'indexing': numpy.int64} rN>> info = np.__array_namespace_info__() >>> info.dtypes(kind='signed integer') {'int8': numpy.int8, 'int16': numpy.int16, 'int32': numpy.int32, 'int64': numpy.int64} r"r#) rr r r r rrrrrrrrrzsigned integer)r r r r zunsigned integer)rrrrr&)r r r r rrrrr$)rrr%)rrnumeric) r r r r rrrrrrrr)r*zunsupported kind: )r(rrr r r r rrrrrrrr isinstancetupleupdatedtypes)rr r*resks rr0z__array_namespace_info__.dtypessVn  &8  <d d uuuu--- > >"9-#J/  6>D> ! # #d uuu   % %u---   : d uuuu---   ? " > >  % %"9-#J/  9 d uuuu--- > >"9-#J/   dE "C 0 4;;A;./ 0J-dX677rcdgS)a- The devices supported by NumPy. For NumPy, this always returns ``['cpu']``. Returns ------- devices : list of str The devices supported by NumPy. See Also -------- __array_namespace_info__.capabilities, __array_namespace_info__.default_device, __array_namespace_info__.default_dtypes, __array_namespace_info__.dtypes Examples -------- >>> info = np.__array_namespace_info__() >>> info.devices() ['cpu'] rrrs rdevicesz __array_namespace_info__.devicesAs 2wr) __name__ __module__ __qualname____doc__rrr)r0r4rrrrrs7>J* X6(,2 h $$E8NrrN)r8 numpy._corerrrrrrr r r r r rrrrrrrrr:s/&}}r