├── .editorconfig ├── .gitattributes ├── .gitignore ├── .npmrc ├── LICENSE ├── Makefile ├── README.md ├── data ├── array_api.csv ├── array_api.json ├── common_apis.csv ├── common_apis.json ├── common_apis_ranks.csv ├── common_apis_ranks.json ├── common_complement.csv ├── common_complement.json ├── complement.csv ├── complement.json ├── intersection.csv ├── intersection.json ├── intersection_ranks.csv ├── intersection_ranks.json ├── join.csv ├── join.json ├── joins │ ├── cupy_numpy.csv │ ├── cupy_numpy.json │ ├── dask_numpy.csv │ ├── dask_numpy.json │ ├── jax_numpy.csv │ ├── jax_numpy.json │ ├── methods │ │ ├── cupy_numpy.csv │ │ ├── cupy_numpy.json │ │ ├── dask_numpy.csv │ │ ├── dask_numpy.json │ │ ├── jax_numpy.csv │ │ ├── jax_numpy.json │ │ ├── mxnet_numpy.csv │ │ ├── mxnet_numpy.json │ │ ├── pytorch_numpy.csv │ │ ├── pytorch_numpy.json │ │ ├── sparse_numpy.csv │ │ ├── sparse_numpy.json │ │ ├── tensorflow_numpy.csv │ │ └── tensorflow_numpy.json │ ├── mxnet_numpy.csv │ ├── mxnet_numpy.json │ ├── pytorch_numpy.csv │ ├── pytorch_numpy.json │ ├── rnumpy_numpy.csv │ ├── rnumpy_numpy.json │ ├── sparse_numpy.csv │ ├── sparse_numpy.json │ ├── tensorflow_numpy.csv │ └── tensorflow_numpy.json ├── lib_top_100_category_stats.csv ├── lib_top_100_category_stats.json ├── lib_top_k_common.csv ├── lib_top_k_common.json ├── method_common_apis.csv ├── method_common_apis.json ├── method_common_complement.csv ├── method_common_complement.json ├── method_complement.csv ├── method_complement.json ├── method_intersection.csv ├── method_intersection.json ├── method_join.csv ├── method_join.json ├── raw │ ├── array_api.json │ ├── array_api.txt │ ├── cupy.csv │ ├── cupy.json │ ├── cupy_data_types.txt │ ├── dask.csv │ ├── dask.json │ ├── jax.csv │ ├── jax.json │ ├── jax_data_types.txt │ ├── mxnet.csv │ ├── mxnet.json │ ├── mxnet_methods.csv │ ├── mxnet_methods.json │ ├── numpy.csv │ ├── numpy.json │ ├── numpy_aliases.csv │ ├── numpy_aliases.json │ ├── numpy_all.csv │ ├── numpy_all.json │ ├── numpy_array_api.csv │ ├── numpy_array_api.json │ ├── numpy_categories.csv │ ├── numpy_categories.json │ ├── numpy_data_types.txt │ ├── numpy_method_list.csv │ ├── numpy_method_list.json │ ├── numpy_methods.csv │ ├── numpy_methods.json │ ├── numpy_methods_to_functions.csv │ ├── numpy_methods_to_functions.json │ ├── pytorch.csv │ ├── pytorch.json │ ├── pytorch_data_types.txt │ ├── pytorch_methods.csv │ ├── pytorch_methods.json │ ├── sparse.csv │ ├── sparse.json │ ├── tensorflow.csv │ ├── tensorflow.json │ └── tensorflow_data_types.txt └── vendor │ ├── record.csv │ └── record.json ├── docs ├── array_api.html ├── common_apis.html ├── common_apis_ranks.html ├── common_complement.html ├── complement.html ├── css │ ├── main.css │ └── normalize.css ├── intersection.html ├── intersection_ranks.html ├── join.html ├── js │ └── main.js ├── lib_top_k_common.html ├── method_common_apis.html ├── method_common_complement.html ├── method_complement.html ├── method_intersection.html ├── method_join.html └── table_template.html ├── etc └── libraries.json ├── notebooks └── analysis.ipynb ├── package.json ├── scripts ├── array_api.js ├── common_apis_category_stats.js ├── common_apis_json.js ├── common_apis_ranks.js ├── common_complement_json.js ├── complement_json.js ├── csv2json.js ├── html_table.js ├── intersection_category_stats.js ├── intersection_json.js ├── intersection_ranks.js ├── join_json.js ├── json2csv.js ├── lib_top_100_category_stats.js ├── lib_top_k_common_complement_json.js ├── lib_top_k_common_json.js ├── lib_top_k_complement_json.js ├── method_common_apis_json.js ├── method_common_complement_json.js ├── method_complement_json.js ├── method_intersection_json.js ├── method_join_json.js └── utils │ ├── csv2json.js │ ├── downstream_libraries.js │ ├── html_table.js │ ├── json2csv.js │ ├── numpy2category.js │ ├── numpy_canonicalize.js │ ├── numpy_category_stats.js │ ├── numpy_dealias.js │ ├── rank_by_usage.js │ └── rank_by_usage_top_k_names.js ├── signatures ├── arithmetic │ ├── README.md │ ├── add.md │ ├── divide.md │ ├── floor_divide.md │ ├── multiply.md │ ├── remainder.md │ └── subtract.md ├── bitwise │ ├── bitwise_and.md │ ├── bitwise_invert.md │ ├── bitwise_lshift.md │ ├── bitwise_or.md │ ├── bitwise_rshift.md │ └── bitwise_xor.md ├── comparison │ ├── equal.md │ ├── greater.md │ ├── greater_equal.md │ ├── less.md │ ├── less_equal.md │ └── not_equal.md ├── creation │ ├── arange.md │ ├── empty.md │ ├── empty_like.md │ ├── eye.md │ ├── full.md │ ├── full_like.md │ ├── linspace.md │ ├── meshgrid.md │ ├── ones.md │ ├── ones_like.md │ ├── tril.md │ ├── triu.md │ ├── zeros.md │ └── zeros_like.md ├── data-types │ ├── can_cast.md │ ├── finfo.md │ └── iinfo.md ├── fft-functions │ ├── fft.md │ ├── fft2.md │ ├── fftfreq.md │ ├── fftn.md │ ├── fftshift.md │ ├── hfft.md │ ├── ifft.md │ ├── ifft2.md │ ├── ifftn.md │ ├── ifftshift.md │ ├── ihfft.md │ ├── irfft.md │ ├── irfft2.md │ ├── irfftn.md │ ├── rfft.md │ ├── rfft2.md │ ├── rfftfreq.md │ └── rfftn.md ├── indexing │ ├── take.md │ └── take_along_axis.md ├── linalg │ ├── cholesky.md │ ├── cross.md │ ├── det.md │ ├── diagonal.md │ ├── dot.md │ ├── eig.md │ ├── inv.md │ ├── lstsq.md │ ├── matmul.md │ ├── matrix_power.md │ ├── matrix_rank.md │ ├── norm.md │ ├── outer.md │ ├── pinv.md │ ├── qr.md │ ├── slogdet.md │ ├── solve.md │ ├── svd.md │ ├── tensordot.md │ ├── trace.md │ └── transpose.md ├── logical │ ├── isfinite.md │ ├── isinf.md │ ├── isnan.md │ ├── logical_and.md │ ├── logical_not.md │ ├── logical_or.md │ └── logical_xor.md ├── manipulation │ ├── broadcast_arrays.md │ ├── broadcast_shapes.md │ ├── broadcast_to.md │ ├── concat.md │ ├── expand_dims.md │ ├── flip.md │ ├── moveaxis.md │ ├── repeat.md │ ├── reshape.md │ ├── roll.md │ ├── squeeze.md │ ├── stack.md │ └── tile.md ├── mathematical-functions-elementwise │ ├── README.md │ ├── abs.md │ ├── acos.md │ ├── acosh.md │ ├── asin.md │ ├── asinh.md │ ├── atan.md │ ├── atan2.md │ ├── atanh.md │ ├── ceil.md │ ├── conj.md │ ├── cos.md │ ├── cosh.md │ ├── diff.md │ ├── exp.md │ ├── expm1.md │ ├── floor.md │ ├── log.md │ ├── log10.md │ ├── log1p.md │ ├── log2.md │ ├── logaddexp.md │ ├── negative.md │ ├── nextafter.md │ ├── positive.md │ ├── pow.md │ ├── reciprocal.md │ ├── round.md │ ├── sign.md │ ├── signbit.md │ ├── sin.md │ ├── sinh.md │ ├── sqrt.md │ ├── square.md │ ├── tan.md │ ├── tanh.md │ └── trunc.md ├── searching │ ├── argmax.md │ ├── argmin.md │ ├── argwhere.md │ ├── nonzero.md │ ├── searchsorted.md │ ├── top_k.md │ └── where.md ├── sets │ └── unique.md ├── sorting │ ├── argsort.md │ └── sort.md ├── statistics │ ├── README.md │ ├── count_nonzero.md │ ├── cumulative_prod.md │ ├── cumulative_sum.md │ ├── max.md │ ├── maximum.md │ ├── mean.md │ ├── min.md │ ├── minimum.md │ ├── prod.md │ ├── std.md │ ├── sum.md │ └── var.md └── utilities │ ├── all.md │ └── any.md └── tools └── make ├── Makefile ├── common.mk ├── debug.mk ├── help.mk ├── lib ├── array_api.mk ├── common_apis.mk ├── common_apis_ranks.mk ├── common_complement.mk ├── complement.mk ├── intersection.mk ├── intersection_ranks.mk ├── join.mk ├── lib_top_k_common.mk ├── lib_top_k_common_complement.mk ├── lib_top_k_complement.mk ├── method_common_apis.mk ├── method_common_complement.mk ├── method_complement.mk ├── method_intersection.mk ├── method_join.mk └── node.mk └── usage.txt /.gitattributes: -------------------------------------------------------------------------------- 1 | #/ 2 | # @license MIT 3 | # 4 | # Copyright (c) 2020 Python Data APIs Consortium. 5 | # 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy 7 | # of this software and associated documentation files (the "Software"), to deal 8 | # in the Software without restriction, including without limitation the rights 9 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | # copies of the Software, and to permit persons to whom the Software is 11 | # furnished to do so, subject to the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included in all 14 | # copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | # SOFTWARE. 23 | #/ 24 | #/ 25 | 26 | # Configuration file which assigns attributes to pathnames. 27 | # 28 | # [1]: https://git-scm.com/docs/gitattributes 29 | 30 | # Automatically normalize the line endings of any committed text files: 31 | * text=auto 32 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | #/ 2 | # @license MIT 3 | # 4 | # Copyright (c) 2020 Python Data APIs Consortium. 5 | # 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy 7 | # of this software and associated documentation files (the "Software"), to deal 8 | # in the Software without restriction, including without limitation the rights 9 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | # copies of the Software, and to permit persons to whom the Software is 11 | # furnished to do so, subject to the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included in all 14 | # copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | # SOFTWARE. 23 | #/ 24 | 25 | # Configuration for [npm][1]. 26 | # 27 | # [1]: https://docs.npmjs.com/files/npmrc 28 | 29 | # Disable the creation of a lock file: 30 | package-lock = false 31 | shrinkwrap = false 32 | 33 | # Disable automatically "saving" dependencies on install: 34 | save = false 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Consortium for Python Data API Standards contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /data/joins/sparse_numpy.csv: -------------------------------------------------------------------------------- 1 | name,numpy 2 | "COO","" 3 | "DOK","" 4 | "GCXS","" 5 | "SparseArray","" 6 | "argwhere","numpy.argwhere" 7 | "as_coo","" 8 | "clip","numpy.clip" 9 | "concatenate","numpy.concatenate" 10 | "diagonal","numpy.diagonal" 11 | "diagonalize","" 12 | "dot","numpy.dot" 13 | "elemwise","" 14 | "eye","numpy.eye" 15 | "full","numpy.full" 16 | "full_like","numpy.full_like" 17 | "isneginf","numpy.isneginf" 18 | "isposinf","numpy.isposinf" 19 | "kron","numpy.kron" 20 | "load_npz","" 21 | "matmul","numpy.matmul" 22 | "moveaxis","numpy.moveaxis" 23 | "nanmax","numpy.nanmax" 24 | "nanmean","numpy.nanmean" 25 | "nanmin","numpy.nanmin" 26 | "nanprod","numpy.nanprod" 27 | "nanreduce","" 28 | "nansum","numpy.nansum" 29 | "ones","numpy.ones" 30 | "ones_like","numpy.ones_like" 31 | "outer","numpy.outer" 32 | "pad","numpy.pad" 33 | "random","numpy.random.random" 34 | "result_type","numpy.result_type" 35 | "roll","numpy.roll" 36 | "save_npz","" 37 | "stack","numpy.stack" 38 | "tensordot","numpy.tensordot" 39 | "tril","numpy.tril" 40 | "triu","numpy.triu" 41 | "where","numpy.where" 42 | "zeros","numpy.zeros" 43 | "zeros_like","numpy.zeros_like" -------------------------------------------------------------------------------- /data/joins/sparse_numpy.json: -------------------------------------------------------------------------------- 1 | [{"name":"COO","numpy":""},{"name":"DOK","numpy":""},{"name":"GCXS","numpy":""},{"name":"SparseArray","numpy":""},{"name":"argwhere","numpy":"numpy.argwhere"},{"name":"as_coo","numpy":""},{"name":"clip","numpy":"numpy.clip"},{"name":"concatenate","numpy":"numpy.concatenate"},{"name":"diagonal","numpy":"numpy.diagonal"},{"name":"diagonalize","numpy":""},{"name":"dot","numpy":"numpy.dot"},{"name":"elemwise","numpy":""},{"name":"eye","numpy":"numpy.eye"},{"name":"full","numpy":"numpy.full"},{"name":"full_like","numpy":"numpy.full_like"},{"name":"isneginf","numpy":"numpy.isneginf"},{"name":"isposinf","numpy":"numpy.isposinf"},{"name":"kron","numpy":"numpy.kron"},{"name":"load_npz","numpy":""},{"name":"matmul","numpy":"numpy.matmul"},{"name":"moveaxis","numpy":"numpy.moveaxis"},{"name":"nanmax","numpy":"numpy.nanmax"},{"name":"nanmean","numpy":"numpy.nanmean"},{"name":"nanmin","numpy":"numpy.nanmin"},{"name":"nanprod","numpy":"numpy.nanprod"},{"name":"nanreduce","numpy":""},{"name":"nansum","numpy":"numpy.nansum"},{"name":"ones","numpy":"numpy.ones"},{"name":"ones_like","numpy":"numpy.ones_like"},{"name":"outer","numpy":"numpy.outer"},{"name":"pad","numpy":"numpy.pad"},{"name":"random","numpy":"numpy.random.random"},{"name":"result_type","numpy":"numpy.result_type"},{"name":"roll","numpy":"numpy.roll"},{"name":"save_npz","numpy":""},{"name":"stack","numpy":"numpy.stack"},{"name":"tensordot","numpy":"numpy.tensordot"},{"name":"tril","numpy":"numpy.tril"},{"name":"triu","numpy":"numpy.triu"},{"name":"where","numpy":"numpy.where"},{"name":"zeros","numpy":"numpy.zeros"},{"name":"zeros_like","numpy":"numpy.zeros_like"}] -------------------------------------------------------------------------------- /data/lib_top_100_category_stats.csv: -------------------------------------------------------------------------------- 1 | category,dask.array,matplotlib,pandas,skimage,xarray 2 | "(other)","1","4","5","2","4" 3 | "binary_ops","3","0","0","1","0" 4 | "creation","11","18","17","19","15" 5 | "datetime","0","0","0","0","1" 6 | "indexing","6","5","6","7","6" 7 | "io","0","0","0","1","0" 8 | "linalg","4","3","2","5","4" 9 | "logical","8","10","12","6","7" 10 | "manipulation","6","19","10","19","11" 11 | "math","32","25","26","23","29" 12 | "sets","1","1","2","1","1" 13 | "signal_processing","10","3","0","0","0" 14 | "sorting","1","1","2","1","0" 15 | "statistics","15","6","14","10","17" 16 | "utilities","2","5","4","5","5" 17 | -------------------------------------------------------------------------------- /data/lib_top_100_category_stats.json: -------------------------------------------------------------------------------- 1 | [{"category":"(other)","dask.array":1,"matplotlib":4,"pandas":5,"skimage":2,"xarray":4},{"category":"binary_ops","dask.array":3,"matplotlib":0,"pandas":0,"skimage":1,"xarray":0},{"category":"creation","dask.array":11,"matplotlib":18,"pandas":17,"skimage":19,"xarray":15},{"category":"datetime","dask.array":0,"matplotlib":0,"pandas":0,"skimage":0,"xarray":1},{"category":"indexing","dask.array":6,"matplotlib":5,"pandas":6,"skimage":7,"xarray":6},{"category":"io","dask.array":0,"matplotlib":0,"pandas":0,"skimage":1,"xarray":0},{"category":"linalg","dask.array":4,"matplotlib":3,"pandas":2,"skimage":5,"xarray":4},{"category":"logical","dask.array":8,"matplotlib":10,"pandas":12,"skimage":6,"xarray":7},{"category":"manipulation","dask.array":6,"matplotlib":19,"pandas":10,"skimage":19,"xarray":11},{"category":"math","dask.array":32,"matplotlib":25,"pandas":26,"skimage":23,"xarray":29},{"category":"sets","dask.array":1,"matplotlib":1,"pandas":2,"skimage":1,"xarray":1},{"category":"signal_processing","dask.array":10,"matplotlib":3,"pandas":0,"skimage":0,"xarray":0},{"category":"sorting","dask.array":1,"matplotlib":1,"pandas":2,"skimage":1,"xarray":0},{"category":"statistics","dask.array":15,"matplotlib":6,"pandas":14,"skimage":10,"xarray":17},{"category":"utilities","dask.array":2,"matplotlib":5,"pandas":4,"skimage":5,"xarray":5}] 2 | -------------------------------------------------------------------------------- /data/lib_top_k_common.csv: -------------------------------------------------------------------------------- 1 | numpy,dask.array,matplotlib,pandas,skimage,xarray 2 | "numpy.","array","array","array","shape","arange" 3 | "numpy.","arange","arange","arange","array","array" 4 | "numpy.","shape","shape","all","zeros","asarray" 5 | "numpy.","sum","asarray","asarray","sum","reshape" 6 | "numpy.","all","linspace","any","ones","linspace" 7 | "numpy.","ones","zeros","reshape","amax","shape" 8 | "numpy.","reshape","sin","shape","all","ones" 9 | "numpy.","mean","ravel","isnan","arange","all" 10 | "numpy.","isnan","amax","sum","reshape","ravel" 11 | "numpy.","amax","transpose","zeros","absolute","zeros" 12 | "numpy.","amin","amin","mean","sqrt","transpose" 13 | "numpy.","prod","absolute","take","ravel","mean" 14 | "numpy.","any","reshape","empty","asarray","einsum" 15 | "numpy.","std","vstack","repeat","mean","sum" 16 | "numpy.","nansum","cos","ones","pad","amin" 17 | "numpy.","zeros","concatenate","transpose","amin","sin" 18 | "numpy.","var","meshgrid","ravel","transpose","amax" 19 | "numpy.","random.randint","all","concatenate","empty","allclose" 20 | "numpy.","dot","sum","where","zeros_like","maximum" 21 | "numpy.","eye","ones","amax","any","pad" 22 | "numpy.","empty","deg2rad","amin","clip","any" 23 | "numpy.","transpose","any","add","linspace","empty" 24 | "numpy.","diagonal","sqrt","random.randint","std","isnan" 25 | "numpy.","nanprod","hypot","sqrt","cos","unique" 26 | "numpy.","argmin","isfinite","nonzero","sin","diff" 27 | -------------------------------------------------------------------------------- /data/method_intersection.csv: -------------------------------------------------------------------------------- 1 | numpy,cupy,dask.array,jax,mxnet,pytorch,tensorflow 2 | "numpy.ndarray","ndarray","Array","ndarray","nd","Tensor","Tensor" 3 | "numpy.ndarray.__abs__","__abs__","__abs__","__abs__","__abs__","__abs__","__abs__" 4 | "numpy.ndarray.__add__","__add__","__add__","__add__","__add__","__add__","__add__" 5 | "numpy.ndarray.__eq__","__eq__","__eq__","__eq__","__eq__","__eq__","__eq__" 6 | "numpy.ndarray.__ge__","__ge__","__ge__","__ge__","__ge__","__ge__","__ge__" 7 | "numpy.ndarray.__getitem__","__getitem__","__getitem__","__getitem__","__getitem__","__getitem__","__getitem__" 8 | "numpy.ndarray.__gt__","__gt__","__gt__","__gt__","__gt__","__gt__","__gt__" 9 | "numpy.ndarray.__le__","__le__","__le__","__le__","__le__","__le__","__le__" 10 | "numpy.ndarray.__len__","__len__","__len__","__len__","__len__","__len__","__len__" 11 | "numpy.ndarray.__lt__","__lt__","__lt__","__lt__","__lt__","__lt__","__lt__" 12 | "numpy.ndarray.__mod__","__mod__","__mod__","__mod__","__mod__","__mod__","__mod__" 13 | "numpy.ndarray.__mul__","__mul__","__mul__","__mul__","__mul__","__mul__","__mul__" 14 | "numpy.ndarray.__ne__","__ne__","__ne__","__ne__","__ne__","__ne__","__ne__" 15 | "numpy.ndarray.__neg__","__neg__","__neg__","__neg__","__neg__","__neg__","__neg__" 16 | "numpy.ndarray.__pow__","__pow__","__pow__","__pow__","__pow__","__pow__","__pow__" 17 | "numpy.ndarray.__repr__","__repr__","__repr__","__repr__","__repr__","__repr__","__repr__" 18 | "numpy.ndarray.__str__","__str__","__str__","__str__","__str__","__str__","__str__" 19 | "numpy.ndarray.__sub__","__sub__","__sub__","__sub__","__sub__","__sub__","__sub__" 20 | "numpy.ndarray.__truediv__","__truediv__","__truediv__","__truediv__","__truediv__","__truediv__","__truediv__" 21 | "numpy.ndarray.dtype","dtype","dtype","dtype","dtype","dtype","dtype" 22 | "numpy.ndarray.reshape","reshape","reshape","reshape","reshape","reshape","set_shape" 23 | "numpy.ndarray.shape","shape","shape","shape","shape","shape","shape" 24 | -------------------------------------------------------------------------------- /data/raw/array_api.json: -------------------------------------------------------------------------------- 1 | ["abs","acos","acosh","add","all","any","arange","argmax","argmin","argsort","asarray","asin","asinh","atan","atan2","atanh","bitwise_and","bitwise_invert","bitwise_left_shift","bitwise_or","bitwise_right_shift","bitwise_xor","broadcast_arrays","broadcast_to","can_cast","ceil","concat","cos","cosh","divide","e","einsum","empty","empty_like","equal","exp","expand_dims","expm1","eye","finfo","flip","floor","floor_divide","from_dlpack","full","full_like","greater","greater_equal","iinfo","inf","isfinite","isinf","isnan","less","less_equal","linalg.cholesky","linalg.cross","linalg.det","linalg.diagonal","linalg.eigh","linalg.eigvalsh","linalg.einsum","linalg.inv","linalg.lstsq","linalg.matmul","linalg.matrix_power","linalg.matrix_rank","linalg.norm","linalg.outer","linalg.pinv","linalg.qr","linalg.slogdet","linalg.solve","linalg.svd","linalg.svdvals","linalg.tensordot","linalg.trace","linalg.transpose","linalg.vecdot","linspace","log","log10","log1p","log2","logaddexp","logical_and","logical_not","logical_or","logical_xor","matmul","max","mean","meshgrid","min","multiply","nan","negative","nonzero","not_equal","ones","ones_like","pi","positive","pow","prod","remainder","reshape","result_type","roll","round","sign","sin","sinh","sort","sqrt","square","squeeze","stack","std","subtract","sum","tan","tanh","tensordot","transpose","trunc","unique","var","vecdot","where","zeros","zeros_like"] 2 | -------------------------------------------------------------------------------- /data/raw/array_api.txt: -------------------------------------------------------------------------------- 1 | abs 2 | acos 3 | acosh 4 | add 5 | all 6 | any 7 | arange 8 | argmax 9 | argmin 10 | argsort 11 | asarray 12 | asin 13 | asinh 14 | atan 15 | atan2 16 | atanh 17 | bitwise_and 18 | bitwise_invert 19 | bitwise_left_shift 20 | bitwise_or 21 | bitwise_right_shift 22 | bitwise_xor 23 | broadcast_arrays 24 | broadcast_to 25 | can_cast 26 | ceil 27 | concat 28 | cos 29 | cosh 30 | divide 31 | e 32 | einsum 33 | empty 34 | empty_like 35 | equal 36 | exp 37 | expand_dims 38 | expm1 39 | eye 40 | finfo 41 | flip 42 | floor 43 | floor_divide 44 | from_dlpack 45 | full 46 | full_like 47 | greater 48 | greater_equal 49 | iinfo 50 | inf 51 | isfinite 52 | isinf 53 | isnan 54 | less 55 | less_equal 56 | linalg.cholesky 57 | linalg.cross 58 | linalg.det 59 | linalg.diagonal 60 | linalg.eigh 61 | linalg.eigvalsh 62 | linalg.einsum 63 | linalg.inv 64 | linalg.lstsq 65 | linalg.matmul 66 | linalg.matrix_power 67 | linalg.matrix_rank 68 | linalg.norm 69 | linalg.outer 70 | linalg.pinv 71 | linalg.qr 72 | linalg.slogdet 73 | linalg.solve 74 | linalg.svd 75 | linalg.svdvals 76 | linalg.tensordot 77 | linalg.trace 78 | linalg.transpose 79 | linalg.vecdot 80 | linspace 81 | log 82 | log10 83 | log1p 84 | log2 85 | logaddexp 86 | logical_and 87 | logical_not 88 | logical_or 89 | logical_xor 90 | matmul 91 | max 92 | mean 93 | meshgrid 94 | min 95 | multiply 96 | nan 97 | negative 98 | nonzero 99 | not_equal 100 | ones 101 | ones_like 102 | pi 103 | positive 104 | pow 105 | prod 106 | remainder 107 | reshape 108 | result_type 109 | roll 110 | round 111 | sign 112 | sin 113 | sinh 114 | sort 115 | sqrt 116 | square 117 | squeeze 118 | stack 119 | std 120 | subtract 121 | sum 122 | tan 123 | tanh 124 | tensordot 125 | transpose 126 | trunc 127 | unique 128 | var 129 | vecdot 130 | where 131 | zeros 132 | zeros_like 133 | -------------------------------------------------------------------------------- /data/raw/cupy_data_types.txt: -------------------------------------------------------------------------------- 1 | bool_ 2 | complex64 3 | complex128 4 | float16 5 | float32 6 | float64 7 | int8 8 | int16 9 | int32 10 | int64 11 | uint8 12 | uint16 13 | uint32 14 | uint64 15 | -------------------------------------------------------------------------------- /data/raw/jax_data_types.txt: -------------------------------------------------------------------------------- 1 | bool 2 | bfloat16 3 | complex64 4 | complex128 5 | float16 6 | float32 7 | float64 8 | int8 9 | int16 10 | int32 11 | int64 12 | uint8 13 | uint16 14 | uint32 15 | uint64 16 | -------------------------------------------------------------------------------- /data/raw/numpy_aliases.csv: -------------------------------------------------------------------------------- 1 | alias,name 2 | "numpy.abs","numpy.absolute" 3 | "numpy.divide","numpy.true_divide" 4 | "numpy.fabs","numpy.absolute" 5 | "numpy.max","numpy.amax" 6 | "numpy.min","numpy.amin" 7 | "numpy.round_","numpy.around" 8 | -------------------------------------------------------------------------------- /data/raw/numpy_aliases.json: -------------------------------------------------------------------------------- 1 | [{"alias":"numpy.divide","name":"numpy.true_divide"},{"alias":"numpy.max","name":"numpy.amax"},{"alias":"numpy.min","name":"numpy.amin"}] 2 | -------------------------------------------------------------------------------- /data/raw/numpy_data_types.txt: -------------------------------------------------------------------------------- 1 | bool_ 2 | bool8 3 | byte 4 | short 5 | intc 6 | int_ 7 | longlong 8 | intp 9 | int8 10 | int16 11 | int32 12 | int64 13 | ubyte 14 | ushort 15 | uintc 16 | uint 17 | ulonglong 18 | uintp 19 | uint8 20 | uint16 21 | uint32 22 | uint64 23 | half 24 | single 25 | double 26 | float_ 27 | longfloat 28 | float16 29 | float32 30 | float64 31 | float96 32 | float128 33 | csingle 34 | complex_ 35 | clongfloat 36 | complex64 37 | complex128 38 | complex192 39 | complex256 40 | object_ 41 | bytes_ 42 | unicode_ 43 | void 44 | -------------------------------------------------------------------------------- /data/raw/pytorch_data_types.txt: -------------------------------------------------------------------------------- 1 | bfloat16 2 | bool 3 | complex64 4 | complex128 5 | float16 6 | float32 7 | float64 8 | int8 9 | int16 10 | int32 11 | int64 12 | uint8 13 | -------------------------------------------------------------------------------- /data/raw/tensorflow_data_types.txt: -------------------------------------------------------------------------------- 1 | bool 2 | bfloat16 3 | complex64 4 | complex128 5 | float16 6 | float32 7 | float64 8 | int16 9 | int32 10 | int64 11 | qint8 12 | qint16 13 | qint32 14 | quint8 15 | quint16 16 | string 17 | uint8 18 | uint16 19 | uint32 20 | uint64 21 | -------------------------------------------------------------------------------- /docs/css/main.css: -------------------------------------------------------------------------------- 1 | @import url(//fonts.googleapis.com/css?family=Lato:300,400,700); 2 | 3 | *, 4 | *:after, 5 | *:before { 6 | -webkit-box-sizing: border-box; 7 | -moz-box-sizing: border-box; 8 | box-sizing: border-box; } 9 | 10 | body { 11 | font-family: 'Lato', Arial, sans-serif; 12 | color: #7c8d87; 13 | background: #f8f8f8; 14 | } 15 | 16 | a { 17 | color: #31bc86; 18 | text-decoration: none; 19 | } 20 | 21 | a:hover, a:focus { 22 | color: #7c8d87; 23 | } 24 | 25 | .container > header { 26 | margin: 0 auto; 27 | padding: 2em; 28 | text-align: center; 29 | background: rgba(0,0,0,0.01); 30 | } 31 | 32 | .container > header h1 { 33 | font-size: 2.625em; 34 | line-height: 1.3; 35 | margin: 0; 36 | font-weight: 300; 37 | } 38 | 39 | .component { 40 | line-height: 1.5em; 41 | margin: 0 auto; 42 | padding: 0 0 3em; 43 | width: 100%; 44 | max-width: 1400px; 45 | overflow: hidden; 46 | } 47 | 48 | table { 49 | border-collapse: collapse; 50 | margin-bottom: 3em; 51 | width: 100%; 52 | background: #fff; 53 | } 54 | 55 | td, th { 56 | padding: 0.75em 1.5em; 57 | text-align: left; 58 | } 59 | 60 | th { 61 | background-color: #31bc86; 62 | font-weight: bold; 63 | color: #fff; 64 | white-space: nowrap; 65 | } 66 | 67 | tbody th { 68 | background-color: #2ea879; 69 | } 70 | 71 | tbody tr:nth-child(2n-1) { 72 | background-color: #f5f5f5; 73 | transition: all .125s ease-in-out; 74 | } 75 | 76 | tbody tr:hover { 77 | background-color: rgba(129,208,177,.3); 78 | } 79 | 80 | .sticky-wrap { 81 | overflow-x: auto; 82 | overflow-y: hidden; 83 | position: relative; 84 | margin: 2em 0; 85 | width: 100%; 86 | } 87 | 88 | .sticky-wrap .sticky-thead, 89 | .sticky-wrap .sticky-col, 90 | .sticky-wrap .sticky-intersect { 91 | opacity: 0; 92 | position: absolute; 93 | top: 0; 94 | left: 0; 95 | transition: all .125s ease-in-out; 96 | z-index: 50; 97 | width: auto; /* Prevent table from stretching to full size */ 98 | } 99 | 100 | .sticky-wrap .sticky-thead { 101 | box-shadow: 0 0.25em 0.1em -0.1em rgba(0,0,0,.125); 102 | z-index: 100; 103 | width: 100%; /* Force stretch */ 104 | } 105 | 106 | .sticky-wrap .sticky-intersect { 107 | opacity: 1; 108 | z-index: 150; 109 | } 110 | 111 | .sticky-wrap .sticky-intersect th { 112 | background-color: #666; 113 | color: #eee; 114 | } 115 | 116 | .sticky-wrap td, 117 | .sticky-wrap th { 118 | box-sizing: border-box; 119 | } 120 | 121 | .sticky-wrap.overflow-y { 122 | overflow-y: auto; 123 | max-height: 50vh; 124 | } 125 | -------------------------------------------------------------------------------- /docs/css/normalize.css: -------------------------------------------------------------------------------- 1 | article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block;}audio,canvas,video{display:inline-block;}audio:not([controls]){display:none;height:0;}[hidden]{display:none;}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;}body{margin:0;}a:focus{outline:thin dotted;}a:active,a:hover{outline:0;}h1{font-size:2em;margin:0.67em 0;}abbr[title]{border-bottom:1px dotted;}b,strong{font-weight:bold;}dfn{font-style:italic;}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0;}mark{background:#ff0;color:#000;}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em;}pre{white-space:pre-wrap;}q{quotes:"\201C" "\201D" "\2018" "\2019";}small{font-size:80%;}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}sup{top:-0.5em;}sub{bottom:-0.25em;}img{border:0;}svg:not(:root){overflow:hidden;}figure{margin:0;}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em;}legend{border:0;padding:0;}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0;}button,input{line-height:normal;}button,select{text-transform:none;}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer;}button[disabled],html input[disabled]{cursor:default;}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0;}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none;}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}textarea{overflow:auto;vertical-align:top;}table{border-collapse:collapse;border-spacing:0;} 2 | -------------------------------------------------------------------------------- /docs/table_template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | {{TITLE}} 11 | 12 | 13 | 14 | 15 |
16 |
17 |

{{TITLE}}

18 |
19 |
20 | {{TABLE}} 21 |
22 |
23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /etc/libraries.json: -------------------------------------------------------------------------------- 1 | [ 2 | "numpy", 3 | "cupy", 4 | "dask.array", 5 | "jax", 6 | "mxnet", 7 | "pytorch", 8 | "tensorflow" 9 | ] 10 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "array-api-comparison", 4 | "version": "0.0.0", 5 | "description": "Array API comparison.", 6 | "license": "MIT", 7 | "repository": { 8 | "type": "git", 9 | "url": "git://github.com/data-apis/array-api-comparison.git" 10 | }, 11 | "bugs": { 12 | "url": "https://github.com/data-apis/array-api-comparison/issues" 13 | }, 14 | "dependencies": {}, 15 | "devDependencies": { 16 | "@stdlib/stdlib": "0.0.92" 17 | }, 18 | "keywords": [] 19 | } 20 | -------------------------------------------------------------------------------- /scripts/common_apis_category_stats.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * @license MIT 5 | * 6 | * Copyright (c) 2020 Python Data APIs Consortium. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in all 16 | * copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | 'use strict'; 28 | 29 | // MODULES // 30 | 31 | var pluck = require( '@stdlib/utils/pluck' ); 32 | var stats = require( './utils/numpy_category_stats.js' ); 33 | var DATA = require( './../data/common_apis.json' ); 34 | 35 | 36 | // MAIN // 37 | 38 | /** 39 | * Main execution sequence. 40 | * 41 | * @private 42 | */ 43 | function main() { 44 | var list; 45 | var out; 46 | 47 | // Extract a list of NumPy APIs: 48 | list = pluck( DATA, 'numpy' ); 49 | 50 | // Compute category statistics... 51 | out = stats( list ); 52 | 53 | // Print the result: 54 | console.log( JSON.stringify( out ) ); 55 | } 56 | 57 | main(); 58 | -------------------------------------------------------------------------------- /scripts/common_apis_json.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * @license MIT 5 | * 6 | * Copyright (c) 2020 Python Data APIs Consortium. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in all 16 | * copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | 'use strict'; 28 | 29 | // MODULES // 30 | 31 | var pick = require( '@stdlib/utils/pick' ); 32 | var ceil = require( '@stdlib/math/base/special/ceil' ); 33 | var LIBRARIES = require( './../etc/libraries.json' ); 34 | var DATA = require( './../data/join.json' ); 35 | 36 | 37 | // VARIABLES // 38 | 39 | // Define the minimum number of libraries in which an interface must appear in order to be considered "common": 40 | var THRESHOLD = ceil( 0.67 * LIBRARIES.length ); 41 | 42 | 43 | // MAIN // 44 | 45 | /** 46 | * Main execution sequence. 47 | * 48 | * @private 49 | */ 50 | function main() { 51 | var out; 52 | var cnt; 53 | var d; 54 | var i; 55 | var j; 56 | 57 | out = []; 58 | for ( i = 0; i < DATA.length; i++ ) { 59 | d = DATA[ i ]; 60 | cnt = 0; 61 | for ( j = 0; j < LIBRARIES.length; j++ ) { 62 | if ( d[ LIBRARIES[j] ] ) { 63 | cnt += 1; 64 | } 65 | } 66 | if ( cnt >= THRESHOLD ) { 67 | out.push( pick( d, LIBRARIES ) ); 68 | } 69 | } 70 | // Print the data as JSON to stdout: 71 | console.log( JSON.stringify( out ) ); 72 | } 73 | 74 | main(); 75 | -------------------------------------------------------------------------------- /scripts/common_apis_ranks.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * @license MIT 5 | * 6 | * Copyright (c) 2020 Python Data APIs Consortium. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in all 16 | * copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | 'use strict'; 28 | 29 | // MODULES // 30 | 31 | var pluck = require( '@stdlib/utils/pluck' ); 32 | var rankByUsage = require( './utils/rank_by_usage.js' ); 33 | var LIST = require( './../data/common_apis.json' ); 34 | 35 | 36 | // MAIN // 37 | 38 | /** 39 | * Main execution sequence. 40 | * 41 | * @private 42 | */ 43 | function main() { 44 | var list; 45 | var out; 46 | 47 | // Extract a list of NumPy APIs: 48 | list = pluck( LIST, 'numpy' ); 49 | 50 | // Rank the list of NumPy APIs based on relative usage: 51 | out = rankByUsage( list, true ); 52 | 53 | // Print the result: 54 | console.log( JSON.stringify( out ) ); 55 | } 56 | 57 | main(); 58 | -------------------------------------------------------------------------------- /scripts/common_complement_json.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * @license MIT 5 | * 6 | * Copyright (c) 2020 Python Data APIs Consortium. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in all 16 | * copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | 'use strict'; 28 | 29 | // MODULES // 30 | 31 | var pick = require( '@stdlib/utils/pick' ); 32 | var LIBRARIES = require( './../etc/libraries.json' ); 33 | var JOIN = require( './../data/join.json' ); 34 | var COMMON_APIS = require( './../data/common_apis.json' ); 35 | 36 | 37 | // MAIN // 38 | 39 | /** 40 | * Main execution sequence. 41 | * 42 | * @private 43 | */ 44 | function main() { 45 | var out; 46 | var d; 47 | var i; 48 | var j; 49 | 50 | out = []; 51 | for ( i = 0; i < JOIN.length; i++ ) { 52 | d = JOIN[ i ]; 53 | 54 | // Check if the API is among the list of common APIs (if so, skip it).... 55 | for ( j = 0; j < COMMON_APIS.length; j++ ) { 56 | if ( d.numpy === COMMON_APIS[ j ].numpy ) { 57 | break; 58 | } 59 | } 60 | if ( j === COMMON_APIS.length ) { 61 | out.push( pick( d, LIBRARIES ) ); 62 | } 63 | } 64 | // Print the list as JSON to stdout: 65 | console.log( JSON.stringify( out ) ); 66 | } 67 | 68 | main(); 69 | -------------------------------------------------------------------------------- /scripts/complement_json.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * @license MIT 5 | * 6 | * Copyright (c) 2020 Python Data APIs Consortium. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in all 16 | * copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | 'use strict'; 28 | 29 | // MODULES // 30 | 31 | var pick = require( '@stdlib/utils/pick' ); 32 | var LIBRARIES = require( './../etc/libraries.json' ); 33 | var JOIN = require( './../data/join.json' ); 34 | var INTERSECTION = require( './../data/intersection.json' ); 35 | 36 | 37 | // MAIN // 38 | 39 | /** 40 | * Main execution sequence. 41 | * 42 | * @private 43 | */ 44 | function main() { 45 | var out; 46 | var d; 47 | var i; 48 | var j; 49 | 50 | out = []; 51 | for ( i = 0; i < JOIN.length; i++ ) { 52 | d = JOIN[ i ]; 53 | 54 | // Check if the API is in the API intersection (if so, skip it).... 55 | for ( j = 0; j < INTERSECTION.length; j++ ) { 56 | if ( d.numpy === INTERSECTION[ j ].numpy ) { 57 | break; 58 | } 59 | } 60 | if ( j === INTERSECTION.length ) { 61 | out.push( pick( d, LIBRARIES ) ); 62 | } 63 | } 64 | // Print the list as JSON to stdout: 65 | console.log( JSON.stringify( out ) ); 66 | } 67 | 68 | main(); 69 | -------------------------------------------------------------------------------- /scripts/intersection_category_stats.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * @license MIT 5 | * 6 | * Copyright (c) 2020 Python Data APIs Consortium. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in all 16 | * copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | 'use strict'; 28 | 29 | // MODULES // 30 | 31 | var pluck = require( '@stdlib/utils/pluck' ); 32 | var stats = require( './utils/numpy_category_stats.js' ); 33 | var INTERSECTION = require( './../data/intersection.json' ); 34 | 35 | 36 | // MAIN // 37 | 38 | /** 39 | * Main execution sequence. 40 | * 41 | * @private 42 | */ 43 | function main() { 44 | var list; 45 | var out; 46 | 47 | // Extract a list of NumPy APIs: 48 | list = pluck( INTERSECTION, 'numpy' ); 49 | 50 | // Compute category statistics... 51 | out = stats( list ); 52 | 53 | // Print the result: 54 | console.log( JSON.stringify( out ) ); 55 | } 56 | 57 | main(); 58 | -------------------------------------------------------------------------------- /scripts/intersection_json.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * @license MIT 5 | * 6 | * Copyright (c) 2020 Python Data APIs Consortium. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in all 16 | * copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | 'use strict'; 28 | 29 | // MODULES // 30 | 31 | var pick = require( '@stdlib/utils/pick' ); 32 | var LIBRARIES = require( './../etc/libraries.json' ); 33 | var JOIN = require( './../data/join.json' ); 34 | 35 | 36 | // MAIN // 37 | 38 | /** 39 | * Main execution sequence. 40 | * 41 | * @private 42 | */ 43 | function main() { 44 | var out; 45 | var cnt; 46 | var d; 47 | var i; 48 | var j; 49 | 50 | out = []; 51 | for ( i = 0; i < JOIN.length; i++ ) { 52 | d = JOIN[ i ]; 53 | cnt = 0; 54 | for ( j = 0; j < LIBRARIES.length; j++ ) { 55 | if ( d[ LIBRARIES[j] ] ) { 56 | cnt += 1; 57 | } 58 | } 59 | if ( cnt === LIBRARIES.length ) { 60 | out.push( pick( d, LIBRARIES ) ); 61 | } 62 | } 63 | // Print the data as JSON to stdout: 64 | console.log( JSON.stringify( out ) ); 65 | } 66 | 67 | main(); 68 | -------------------------------------------------------------------------------- /scripts/intersection_ranks.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * @license MIT 5 | * 6 | * Copyright (c) 2020 Python Data APIs Consortium. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in all 16 | * copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | 'use strict'; 28 | 29 | // MODULES // 30 | 31 | var pluck = require( '@stdlib/utils/pluck' ); 32 | var rankByUsage = require( './utils/rank_by_usage.js' ); 33 | var INTERSECTION = require( './../data/intersection.json' ); 34 | 35 | 36 | // MAIN // 37 | 38 | /** 39 | * Main execution sequence. 40 | * 41 | * @private 42 | */ 43 | function main() { 44 | var list; 45 | var out; 46 | 47 | // Extract a list of NumPy APIs: 48 | list = pluck( INTERSECTION, 'numpy' ); 49 | 50 | // Rank the list of NumPy APIs based on relative usage: 51 | out = rankByUsage( list, true ); 52 | 53 | // Print the result: 54 | console.log( JSON.stringify( out ) ); 55 | } 56 | 57 | main(); 58 | -------------------------------------------------------------------------------- /scripts/lib_top_k_common_complement_json.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * @license MIT 5 | * 6 | * Copyright (c) 2020 Python Data APIs Consortium. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in all 16 | * copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | 'use strict'; 28 | 29 | // MODULES // 30 | 31 | var pluck = require( '@stdlib/utils/pluck' ); 32 | var rankTopK = require( './utils/rank_by_usage_top_k_names.js' ); 33 | var DATA = require( './../data/common_complement.json' ); 34 | 35 | 36 | // MAIN // 37 | 38 | /** 39 | * Main execution sequence. 40 | * 41 | * @private 42 | */ 43 | function main() { 44 | var list; 45 | var out; 46 | 47 | // Extract a list of NumPy APIs: 48 | list = pluck( DATA, 'numpy' ); 49 | 50 | // Rank the list of NumPy APIs based on relative usage: 51 | out = rankTopK( list, 25, true ); 52 | 53 | // Print the result: 54 | console.log( JSON.stringify( out ) ); 55 | } 56 | 57 | main(); 58 | -------------------------------------------------------------------------------- /scripts/lib_top_k_common_json.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * @license MIT 5 | * 6 | * Copyright (c) 2020 Python Data APIs Consortium. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in all 16 | * copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | 'use strict'; 28 | 29 | // MODULES // 30 | 31 | var pluck = require( '@stdlib/utils/pluck' ); 32 | var rankTopK = require( './utils/rank_by_usage_top_k_names.js' ); 33 | var DATA = require( './../data/common_apis.json' ); 34 | 35 | 36 | // MAIN // 37 | 38 | /** 39 | * Main execution sequence. 40 | * 41 | * @private 42 | */ 43 | function main() { 44 | var list; 45 | var out; 46 | 47 | // Extract a list of NumPy APIs: 48 | list = pluck( DATA, 'numpy' ); 49 | 50 | // Rank the list of NumPy APIs based on relative usage: 51 | out = rankTopK( list, 25, true ); 52 | 53 | // Print the result: 54 | console.log( JSON.stringify( out ) ); 55 | } 56 | 57 | main(); 58 | -------------------------------------------------------------------------------- /scripts/lib_top_k_complement_json.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * @license MIT 5 | * 6 | * Copyright (c) 2020 Python Data APIs Consortium. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in all 16 | * copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | 'use strict'; 28 | 29 | // MODULES // 30 | 31 | var pluck = require( '@stdlib/utils/pluck' ); 32 | var rankTopK = require( './utils/rank_by_usage_top_k_names.js' ); 33 | var DATA = require( './../data/complement.json' ); 34 | 35 | 36 | // MAIN // 37 | 38 | /** 39 | * Main execution sequence. 40 | * 41 | * @private 42 | */ 43 | function main() { 44 | var list; 45 | var out; 46 | 47 | // Extract a list of NumPy APIs: 48 | list = pluck( DATA, 'numpy' ); 49 | 50 | // Rank the list of NumPy APIs based on relative usage: 51 | out = rankTopK( list, 25, true ); 52 | 53 | // Print the result: 54 | console.log( JSON.stringify( out ) ); 55 | } 56 | 57 | main(); 58 | -------------------------------------------------------------------------------- /scripts/method_common_apis_json.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * @license MIT 5 | * 6 | * Copyright (c) 2020 Python Data APIs Consortium. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in all 16 | * copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | 'use strict'; 28 | 29 | // MODULES // 30 | 31 | var pick = require( '@stdlib/utils/pick' ); 32 | var ceil = require( '@stdlib/math/base/special/ceil' ); 33 | var LIBRARIES = require( './../etc/libraries.json' ); 34 | var DATA = require( './../data/method_join.json' ); 35 | 36 | 37 | // VARIABLES // 38 | 39 | // Define the minimum number of libraries in which an interface must appear in order to be considered "common": 40 | var THRESHOLD = ceil( 0.67 * LIBRARIES.length ); 41 | 42 | 43 | // MAIN // 44 | 45 | /** 46 | * Main execution sequence. 47 | * 48 | * @private 49 | */ 50 | function main() { 51 | var out; 52 | var cnt; 53 | var d; 54 | var i; 55 | var j; 56 | 57 | out = []; 58 | for ( i = 0; i < DATA.length; i++ ) { 59 | d = DATA[ i ]; 60 | cnt = 0; 61 | for ( j = 0; j < LIBRARIES.length; j++ ) { 62 | if ( d[ LIBRARIES[j] ] ) { 63 | cnt += 1; 64 | } 65 | } 66 | if ( cnt >= THRESHOLD ) { 67 | out.push( pick( d, LIBRARIES ) ); 68 | } 69 | } 70 | // Print the data as JSON to stdout: 71 | console.log( JSON.stringify( out ) ); 72 | } 73 | 74 | main(); 75 | -------------------------------------------------------------------------------- /scripts/method_common_complement_json.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * @license MIT 5 | * 6 | * Copyright (c) 2020 Python Data APIs Consortium. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in all 16 | * copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | 'use strict'; 28 | 29 | // MODULES // 30 | 31 | var pick = require( '@stdlib/utils/pick' ); 32 | var LIBRARIES = require( './../etc/libraries.json' ); 33 | var JOIN = require( './../data/method_join.json' ); 34 | var COMMON_APIS = require( './../data/method_common_apis.json' ); 35 | 36 | 37 | // MAIN // 38 | 39 | /** 40 | * Main execution sequence. 41 | * 42 | * @private 43 | */ 44 | function main() { 45 | var out; 46 | var d; 47 | var i; 48 | var j; 49 | 50 | out = []; 51 | for ( i = 0; i < JOIN.length; i++ ) { 52 | d = JOIN[ i ]; 53 | 54 | // Check if the API is among the list of common APIs (if so, skip it).... 55 | for ( j = 0; j < COMMON_APIS.length; j++ ) { 56 | if ( d.numpy === COMMON_APIS[ j ].numpy ) { 57 | break; 58 | } 59 | } 60 | if ( j === COMMON_APIS.length ) { 61 | out.push( pick( d, LIBRARIES ) ); 62 | } 63 | } 64 | // Print the list as JSON to stdout: 65 | console.log( JSON.stringify( out ) ); 66 | } 67 | 68 | main(); 69 | -------------------------------------------------------------------------------- /scripts/method_complement_json.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * @license MIT 5 | * 6 | * Copyright (c) 2020 Python Data APIs Consortium. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in all 16 | * copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | 'use strict'; 28 | 29 | // MODULES // 30 | 31 | var pick = require( '@stdlib/utils/pick' ); 32 | var LIBRARIES = require( './../etc/libraries.json' ); 33 | var JOIN = require( './../data/method_join.json' ); 34 | var INTERSECTION = require( './../data/method_intersection.json' ); 35 | 36 | 37 | // MAIN // 38 | 39 | /** 40 | * Main execution sequence. 41 | * 42 | * @private 43 | */ 44 | function main() { 45 | var out; 46 | var d; 47 | var i; 48 | var j; 49 | 50 | out = []; 51 | for ( i = 0; i < JOIN.length; i++ ) { 52 | d = JOIN[ i ]; 53 | 54 | // Check if the API is in the API intersection (if so, skip it).... 55 | for ( j = 0; j < INTERSECTION.length; j++ ) { 56 | if ( d.numpy === INTERSECTION[ j ].numpy ) { 57 | break; 58 | } 59 | } 60 | if ( j === INTERSECTION.length ) { 61 | out.push( pick( d, LIBRARIES ) ); 62 | } 63 | } 64 | // Print the list as JSON to stdout: 65 | console.log( JSON.stringify( out ) ); 66 | } 67 | 68 | main(); 69 | -------------------------------------------------------------------------------- /scripts/method_intersection_json.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * @license MIT 5 | * 6 | * Copyright (c) 2020 Python Data APIs Consortium. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in all 16 | * copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | 'use strict'; 28 | 29 | // MODULES // 30 | 31 | var pick = require( '@stdlib/utils/pick' ); 32 | var LIBRARIES = require( './../etc/libraries.json' ); 33 | var JOIN = require( './../data/method_join.json' ); 34 | 35 | 36 | // MAIN // 37 | 38 | /** 39 | * Main execution sequence. 40 | * 41 | * @private 42 | */ 43 | function main() { 44 | var out; 45 | var cnt; 46 | var d; 47 | var i; 48 | var j; 49 | 50 | out = []; 51 | for ( i = 0; i < JOIN.length; i++ ) { 52 | d = JOIN[ i ]; 53 | cnt = 0; 54 | for ( j = 0; j < LIBRARIES.length; j++ ) { 55 | if ( d[ LIBRARIES[j] ] ) { 56 | cnt += 1; 57 | } 58 | } 59 | if ( cnt === LIBRARIES.length ) { 60 | out.push( pick( d, LIBRARIES ) ); 61 | } 62 | } 63 | // Print the data as JSON to stdout: 64 | console.log( JSON.stringify( out ) ); 65 | } 66 | 67 | main(); 68 | -------------------------------------------------------------------------------- /scripts/utils/csv2json.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license MIT 3 | * 4 | * Copyright (c) 2020 Python Data APIs Consortium. 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all 14 | * copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | * SOFTWARE. 23 | */ 24 | 25 | 'use strict'; 26 | 27 | // MODULES // 28 | 29 | var RE_EOL = require( '@stdlib/regexp/eol' ); 30 | 31 | 32 | // MAIN // 33 | 34 | /** 35 | * Converts a CSV string to a JSON array. 36 | * 37 | * @private 38 | * @param {string} csv - CSV string 39 | * @returns {Array} JSON array 40 | */ 41 | function csv2json( csv ) { 42 | var nfields; 43 | var fields; 44 | var nrows; 45 | var rows; 46 | var out; 47 | var r; 48 | var o; 49 | var i; 50 | var j; 51 | 52 | out = []; 53 | rows = csv.split( RE_EOL ); 54 | nrows = rows.length; 55 | if ( nrows === 0 ) { 56 | return out; 57 | } 58 | // We assume that the first row is a header row: 59 | fields = rows[ 0 ].split( ',' ); 60 | nfields = fields.length; 61 | 62 | for ( i = 1; i < nrows; i++ ) { 63 | r = rows[ i ]; 64 | if ( r === '' ) { 65 | continue; 66 | } 67 | // We assume simple CSV rows: 68 | r = r.substring( 1, r.length-1 ).split( '","' ); 69 | 70 | // Assemble the data object... 71 | o = {}; 72 | for ( j = 0; j < nfields; j++ ) { 73 | o[ fields[ j ] ] = r[ j ]; 74 | } 75 | // Append to the output data array: 76 | out.push( o ); 77 | } 78 | return out; 79 | } 80 | 81 | 82 | // EXPORTS // 83 | 84 | module.exports = csv2json; 85 | -------------------------------------------------------------------------------- /scripts/utils/downstream_libraries.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license MIT 3 | * 4 | * Copyright (c) 2020 Python Data APIs Consortium. 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all 14 | * copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | * SOFTWARE. 23 | */ 24 | 25 | 'use strict'; 26 | 27 | // MODULES // 28 | 29 | var objectKeys = require( '@stdlib/utils/keys' ); 30 | var RECORD_DATA = require( './../../data/vendor/record.json' ); 31 | 32 | 33 | // VARIABLES // 34 | 35 | var LIBRARIES; 36 | 37 | 38 | // MAIN // 39 | 40 | /** 41 | * Returns the list of downstream libraries found in the record data. 42 | * 43 | * @private 44 | * @returns {Array} list of libraries 45 | */ 46 | function libraries() { 47 | var tmp; 48 | var i; 49 | if ( LIBRARIES ) { 50 | return LIBRARIES.slice(); 51 | } 52 | tmp = {}; 53 | for ( i = 0; i < RECORD_DATA.length; i++ ) { 54 | tmp[ RECORD_DATA[ i ].library ] = true; 55 | } 56 | LIBRARIES = objectKeys( tmp ).sort(); 57 | return LIBRARIES; 58 | } 59 | 60 | 61 | // EXPORTS // 62 | 63 | module.exports = libraries; 64 | -------------------------------------------------------------------------------- /scripts/utils/numpy2category.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license MIT 3 | * 4 | * Copyright (c) 2020 Python Data APIs Consortium. 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all 14 | * copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | * SOFTWARE. 23 | */ 24 | 25 | 'use strict'; 26 | 27 | // MODULES // 28 | 29 | var keyBy = require( '@stdlib/utils/key-by' ); 30 | var hasOwnProp = require( '@stdlib/assert/has-own-property' ); 31 | var CATEGORIES = require( './../../data/raw/numpy_categories.json' ); 32 | 33 | 34 | // VARIABLES // 35 | 36 | var HASH = keyBy( CATEGORIES, hashFcn ); 37 | 38 | 39 | // FUNCTIONS // 40 | 41 | /** 42 | * Hash function for converting the category data into a lookup table. 43 | * 44 | * @private 45 | * @param {Object} value - collection value 46 | * @param {number} idx - index 47 | * @returns {string} hash value 48 | */ 49 | function hashFcn( value ) { 50 | return value.name; 51 | } 52 | 53 | 54 | // MAIN // 55 | 56 | /** 57 | * Returns the category associated with a specified NumPy API. 58 | * 59 | * @private 60 | * @param {string} name - NumPy API name 61 | * @returns {(null|string)} associated category 62 | */ 63 | function numpy2category( name ) { 64 | var out; 65 | var o; 66 | if ( !hasOwnProp( HASH, name ) ) { 67 | return null; 68 | } 69 | o = HASH[ name ]; 70 | if ( o.category === '' ) { 71 | return '(other)'; 72 | } 73 | out = o.category; 74 | if ( o.subcategory ) { 75 | out += ':' + o.subcategory; 76 | } 77 | return out; 78 | } 79 | 80 | 81 | // EXPORTS // 82 | 83 | module.exports = numpy2category; 84 | -------------------------------------------------------------------------------- /scripts/utils/numpy_canonicalize.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license MIT 3 | * 4 | * Copyright (c) 2020 Python Data APIs Consortium. 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all 14 | * copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | * SOFTWARE. 23 | */ 24 | 25 | 'use strict'; 26 | 27 | // MODULES // 28 | 29 | var dealias = require( './numpy_dealias.js' ); 30 | 31 | 32 | // MAIN // 33 | 34 | /** 35 | * Returns a list of "canonical" NumPy function names. 36 | * 37 | * ## Notes 38 | * 39 | * - This function mutates the input array. 40 | * 41 | * @private 42 | * @param {Array} list - input list 43 | * @returns {Array} input array 44 | */ 45 | function canonicalize( list ) { 46 | var i; 47 | for ( i = 0; i < list.length; i++ ) { 48 | list[ i ] = dealias( list[ i ] ); 49 | } 50 | return list; 51 | } 52 | 53 | 54 | // EXPORTS // 55 | 56 | module.exports = canonicalize; 57 | -------------------------------------------------------------------------------- /scripts/utils/numpy_category_stats.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license MIT 3 | * 4 | * Copyright (c) 2020 Python Data APIs Consortium. 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all 14 | * copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | * SOFTWARE. 23 | */ 24 | 25 | 'use strict'; 26 | 27 | // MODULES // 28 | 29 | var hasOwnProp = require( '@stdlib/assert/has-own-property' ); 30 | var numpy2category = require( './numpy2category.js' ); 31 | 32 | 33 | // MAIN // 34 | 35 | /** 36 | * Returns category statistics for a provided a Numpy API list. 37 | * 38 | * @private 39 | * @param {Array} list - list of NumPy APIs 40 | * @returns {Object} category statistics 41 | */ 42 | function stats( list ) { 43 | var keys; 44 | var out; 45 | var cat; 46 | var tmp; 47 | var i; 48 | 49 | keys = []; 50 | out = {}; 51 | for ( i = 0; i < list.length; i++ ) { 52 | cat = numpy2category( list[ i ] ); 53 | if ( cat === null ) { 54 | cat = '(unknown)'; 55 | } 56 | if ( hasOwnProp( out, cat ) ) { 57 | out[ cat ] += 1; 58 | } else { 59 | out[ cat ] = 1; 60 | } 61 | tmp = cat.split( ':' ); 62 | if ( tmp.length > 1 ) { 63 | if ( hasOwnProp( out, tmp[ 0 ] ) ) { 64 | out[ tmp[ 0 ] ] += 1; 65 | } else { 66 | out[ tmp[ 0 ] ] = 1; 67 | } 68 | keys.push( tmp[ 0 ] ); 69 | } 70 | keys.push( cat ); 71 | } 72 | // Sort category keys... 73 | tmp = out; 74 | keys.sort(); 75 | out = {}; 76 | for ( i = 0; i < keys.length; i++ ) { 77 | out[ keys[ i ] ] = tmp[ keys[ i ] ]; 78 | } 79 | 80 | return out; 81 | } 82 | 83 | 84 | // EXPORTS // 85 | 86 | module.exports = stats; 87 | -------------------------------------------------------------------------------- /scripts/utils/numpy_dealias.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license MIT 3 | * 4 | * Copyright (c) 2020 Python Data APIs Consortium. 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all 14 | * copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | * SOFTWARE. 23 | */ 24 | 25 | 'use strict'; 26 | 27 | // MODULES // 28 | 29 | var FUNCTION_ALIASES = require( './../../data/raw/numpy_aliases.json' ); 30 | 31 | 32 | // MAIN // 33 | 34 | /** 35 | * Returns a "canonical" NumPy function name. 36 | * 37 | * @private 38 | * @param {string} name - function name 39 | * @returns {string} standardized NumPy function name 40 | */ 41 | function dealias( name ) { 42 | var i; 43 | for ( i = 0; i < FUNCTION_ALIASES.length; i++ ) { 44 | if ( FUNCTION_ALIASES[ i ].alias === name ) { 45 | return FUNCTION_ALIASES[ i ].name; 46 | } 47 | } 48 | return name; 49 | } 50 | 51 | 52 | // EXPORTS // 53 | 54 | module.exports = dealias; 55 | -------------------------------------------------------------------------------- /signatures/arithmetic/README.md: -------------------------------------------------------------------------------- 1 | # Arithmetic Operations 2 | 3 | > Generalized signatures for element-wise arithmetic operations. 4 | 5 | ## NumPy 6 | 7 | ``` 8 | numpy.(x1, x2, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 9 | ``` 10 | 11 | ## CuPy 12 | 13 | ``` 14 | cupy.(x1, x2, out=None, dtype=None) → ndarray 15 | ``` 16 | 17 | ## dask.array 18 | 19 | ``` 20 | 21 | ``` 22 | 23 | ## JAX 24 | 25 | ``` 26 | jax.numpy.(x1, x2) → ndarray 27 | ``` 28 | 29 | ## MXNet 30 | 31 | ``` 32 | np.(x1, x2, out=None, **kwargs) → ndarray 33 | ``` 34 | 35 | ## PyTorch 36 | 37 | ``` 38 | torch.(input, other, out=None) → Tensor 39 | ``` 40 | 41 | ## TensorFlow 42 | 43 | ``` 44 | tf.math.(x, y, name=None) → Tensor 45 | ``` 46 | -------------------------------------------------------------------------------- /signatures/arithmetic/add.md: -------------------------------------------------------------------------------- 1 | # add 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.add(x1, x2, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.add(x1, x2, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.add(x1, x2) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.add(x1, x2, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.add(input, other, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.add(x, y, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/arithmetic/divide.md: -------------------------------------------------------------------------------- 1 | # divide 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.divide(x1, x2, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.divide(x1, x2, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.divide(x1, x2) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.divide(x1, x2, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.div(input, other, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.divide(x, y, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/arithmetic/floor_divide.md: -------------------------------------------------------------------------------- 1 | # floor_divide 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.floor_divide(x1, x2, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.floor_divide(x1, x2, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.floor_divide(x1, x2) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.floor_divide(x1, x2, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.floor_divide(input, other, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.floordiv(x, y, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/arithmetic/multiply.md: -------------------------------------------------------------------------------- 1 | # multiply 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.multiply(x1, x2, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.multiply(x1, x2, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.multiply(x1, x2) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.multiply(x1, x2, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.mul(input, other, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.multiply(x, y, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/arithmetic/remainder.md: -------------------------------------------------------------------------------- 1 | # remainder 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.remainder(x1, x2, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.remainder(x1, x2, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.remainder(x1, x2) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.remainder(x1, x2, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.remainder(input, other, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/arithmetic/subtract.md: -------------------------------------------------------------------------------- 1 | # subtract 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.subtract(x1, x2, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.subtract(x1, x2, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.subtract(x1, x2) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.subtract(x1, x2, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.subtract(x, y, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/bitwise/bitwise_and.md: -------------------------------------------------------------------------------- 1 | # bitwise_and 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.bitwise_and(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.bitwise_and(x1, x2, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.bitwise_and(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.bitwise_and(x1, x2) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.bitwise_and(input, other, , out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.bitwise.bitwise_and(x, y, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/bitwise/bitwise_invert.md: -------------------------------------------------------------------------------- 1 | # invert 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.invert(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.invert(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.invert(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.bitwise.invert(x, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/bitwise/bitwise_lshift.md: -------------------------------------------------------------------------------- 1 | # left_shift 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.left_shift(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.left_shift(x1, x2, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.left_shift(x1, x2) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.bitwise.left_shift(x, y, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/bitwise/bitwise_or.md: -------------------------------------------------------------------------------- 1 | # bitwise_or 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.bitwise_or(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.bitwise_or(x1, x2, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.bitwise_or(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.bitwise_or(x1, x2) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.bitwise_or(input, other, , out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.bitwise.bitwise_or(x, y, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/bitwise/bitwise_rshift.md: -------------------------------------------------------------------------------- 1 | # right_shift 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.right_shift(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.right_shift(x1, x2, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.right_shift(x1, x2) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.bitwise.right_shift(x, y, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/bitwise/bitwise_xor.md: -------------------------------------------------------------------------------- 1 | # bitwise_xor 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.bitwise_xor(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.bitwise_xor(x1, x2, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.bitwise_xor(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.bitwise_xor(x1, x2) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.bitwise_xor(input, other, , out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.bitwise.bitwise_xor(x, y, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/comparison/equal.md: -------------------------------------------------------------------------------- 1 | # equal 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.equal(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.equal(x1, x2, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.equal(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.equal(x1, x2) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.equal(x1, x2, out=None) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.eq(input, other, , out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.equal(x, y, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/comparison/greater.md: -------------------------------------------------------------------------------- 1 | # greater 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.greater(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.greater(x1, x2, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.greater(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.greater(x1, x2) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.greater(x1, x2, out=None) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.gt(input, other, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.greater(x, y, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/comparison/greater_equal.md: -------------------------------------------------------------------------------- 1 | # greater_equal 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.greater_equal(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.greater_equal(x1, x2, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.greater_equal(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.greater_equal(x1, x2) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.greater_equal(x1, x2, out=None) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.ge(input, other, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.greater_equal(x, y, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/comparison/less.md: -------------------------------------------------------------------------------- 1 | # less 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.less(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.less(x1, x2, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.less(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.less(x1, x2) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.less(x1, x2, out=None) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.lt(input, other, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.less(x, y, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/comparison/less_equal.md: -------------------------------------------------------------------------------- 1 | # less_equal 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.less_equal(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.less_equal(x1, x2, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.less_equal(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.less_equal(x1, x2) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.less_equal(x1, x2, out=None) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.le(input, other, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.less_equal(x, y, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/comparison/not_equal.md: -------------------------------------------------------------------------------- 1 | # not_equal 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.not_equal(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.not_equal(x1, x2, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.not_equal(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.not_equal(x1, x2) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.not_equal(x1, x2, out=None) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.ne(input, other, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.not_equal(x, y, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/creation/arange.md: -------------------------------------------------------------------------------- 1 | # arange 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.arange([start, ]stop, [step, ]dtype=None, *, like=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.arange(start, stop=None, step=1, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.arange(start=0, stop, step=1, chunks=, dtype=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.arange(start, stop=None, step=None, dtype=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.arange(start, stop=None, step=1, dtype=None, ctx=None) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.arange(start=0, end, step=1, out=None, dtype=None, layout=torch.strided, device=None, requires_grad=False) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.range(limit, delta=1, dtype=None, name='range') → Tensor 43 | tf.range(start, limit, delta=1, dtype=None, name='range') → Tensor 44 | ``` 45 | -------------------------------------------------------------------------------- /signatures/creation/empty.md: -------------------------------------------------------------------------------- 1 | # empty 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.empty(shape, dtype=float, order='C', *, like=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.empty(shape, dtype=, order='C') → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.empty(shape, dtype=numpy.float64, order='C', chunks=, name=) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.empty(shape, dtype=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.empty(*size, out=None, dtype=None, layout=torch.strided, device=None, requires_grad=False, pin_memory=False) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/creation/empty_like.md: -------------------------------------------------------------------------------- 1 | # empty_like 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.empty_like(prototype, dtype=None, order='K', subok=True, shape=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.empty_like(a, dtype=None, order='K', shape=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.empty_like(a, dtype=None, order='C', chunks=None, name=None, shape=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.empty_like(a, dtype=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.empty_like(prototype, dtype=None, order='C', subok=False, shape=None) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.empty_like(input, dtype=None, layout=None, device=None, requires_grad=False, memory_format=torch.preserve_format) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/creation/eye.md: -------------------------------------------------------------------------------- 1 | # eye 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.eye(N, M=None, k=0, dtype=, order='C', *, like=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.eye(N, M=None, k=0, dtype=, order='C') → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.eye(N, chunks='auto', M=None, k=0, dtype=) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.eye(N, M=None, k=0, dtype=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.eye(N, M=None, k=0, dtype=float, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.eye(n, m=None, out=None, dtype=None, layout=torch.strided, device=None, requires_grad=False) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.eye(num_rows, num_columns=None, batch_shape=None, dtype=tf.dtypes.float32, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/creation/full.md: -------------------------------------------------------------------------------- 1 | # full 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.full(shape, fill_value, dtype=None, order='C', *, like=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.full(shape, fill_value, dtype=None, order='C') → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.full(shape, fill_value, *args, **kwargs) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.full(shape, fill_value, dtype=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.full(shape, fill_value, dtype=None, order='C', ctx=None, out=None) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.full(size, fill_value, out=None, dtype=None, layout=torch.strided, device=None, requires_grad=False) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.fill(dims, value, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/creation/full_like.md: -------------------------------------------------------------------------------- 1 | # full_like 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.full_like(a, fill_value, dtype=None, order='K', subok=True, shape=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.full_like(a, fill_value, dtype=None, order='K', subok=None, shape=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.full_like(a, fill_value, order='C', dtype=None, chunks=None, name=None, shape=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.full_like(a, fill_value, dtype=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.full_like(a, fill_value, dtype=None, order='C', ctx=None, out=None) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.full_like(input, fill_value, out=None, dtype=None, layout=torch.strided, device=None, requires_grad=False, memory_format=torch.preserve_format) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/creation/linspace.md: -------------------------------------------------------------------------------- 1 | # linspace 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None, axis=0) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.linspace(start, stop, num=50, endpoint=True, retstep=False, chunks='auto', dtype=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None, axis=0) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None, axis=0, ctx=None) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.linspace(start, end, steps=100, out=None, dtype=None, layout=torch.strided, device=None, requires_grad=False) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.linspace(start, stop, num, name=None, axis=0) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/creation/meshgrid.md: -------------------------------------------------------------------------------- 1 | # meshgrid 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.meshgrid(*xi, copy=True, sparse=False, indexing='xy') → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.meshgrid(*xi, copy=True, sparse=False, indexing='xy') → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.meshgrid(*xi, **kwargs) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.meshgrid(*args, copy=True, sparse=False, indexing='xy') → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.meshgrid(*tensors) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.meshgrid(*args, indexing='xy', name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/creation/ones.md: -------------------------------------------------------------------------------- 1 | # ones 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.ones(shape, dtype=None, order='C', *, like=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.ones(shape, dtype=, order='C') → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.ones(shape, dtype=numpy.float64, order='C') → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.ones(shape, dtype=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.ones(shape, dtype=None, order='C', ctx=None) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.ones(*size, out=None, dtype=None, layout=torch.strided, device=None, requires_grad=False) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.ones(shape, dtype=tf.dtypes.float32, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/creation/ones_like.md: -------------------------------------------------------------------------------- 1 | # ones_like 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.ones_like(a, dtype=None, order='K', subok=True, shape=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.ones_like(a, dtype=None, order='K', subok=None, shape=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.ones_like(a, dtype=None, order='C', chunks=None, name=None, shape=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.ones_like(a, dtype=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.ones_like(a, dtype=None, order='C', ctx=None, out=None) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.ones_like(input, dtype=None, layout=None, device=None, requires_grad=False, memory_format=torch.preserve_format) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.ones_like(input, dtype=None, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/creation/tril.md: -------------------------------------------------------------------------------- 1 | # tril 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.tril(m, k=0) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.tril(m, k=0) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.tril(m, k=0) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.tril(m, k=0) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.tril(m, k=0) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.tril(input, diagonal=0, *, out=None) → Tensor 37 | ``` 38 | 39 | Supports batching. 40 | 41 | ## TensorFlow 42 | 43 | ``` 44 | 45 | ``` 46 | -------------------------------------------------------------------------------- /signatures/creation/triu.md: -------------------------------------------------------------------------------- 1 | # triu 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.triu(m, k=0) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.triu(m, k=0) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.triu(m, k=0) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.triu(m, k=0) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.triu(m, k=0) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.triu(input, diagonal=0, *, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/creation/zeros.md: -------------------------------------------------------------------------------- 1 | # zeros 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.zeros(shape, dtype=float, order='C', *, like=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.zeros(shape, dtype=, order='C') → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.zeros(shape, dtype=numpy.float64, order='C') → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.zeros(shape, dtype=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.zeros(shape, dtype=None, order='C', ctx=None) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.zeros(*size, out=None, dtype=None, layout=torch.strided, device=None, requires_grad=False) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.zeros(shape, dtype=tf.dtypes.float32, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/creation/zeros_like.md: -------------------------------------------------------------------------------- 1 | # zeros_like 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.zeros_like(a, dtype=None, order='K', subok=True, shape=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.zeros_like(a, dtype=None, order='K', subok=None, shape=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.zeros_like(a, dtype=None, order='C', chunks=None, name=None, shape=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.zeros_like(a, dtype=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.zeros_like(a, dtype=None, order='C', ctx=None, out=None) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.zeros_like(input, dtype=None, layout=None, device=None, requires_grad=False, memory_format=torch.preserve_format) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.zeros_like(input, dtype=None, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/data-types/can_cast.md: -------------------------------------------------------------------------------- 1 | # can_cast 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.can_cast(from_, to, casting='safe') → bool 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.can_cast(from_, to, casting='safe') → bool 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.can_cast(from_, to, casting='safe') → bool 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.can_cast(from, to) → bool 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/data-types/finfo.md: -------------------------------------------------------------------------------- 1 | # finfo 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.finfo(type) → class 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.finfo(type) → class 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.finfo(type) → class 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.finfo(type) → class 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.experimental.numpy.finfo(type) → class 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/data-types/iinfo.md: -------------------------------------------------------------------------------- 1 | # iinfo 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.iinfo(type) → class 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.iinfo(type) → class 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.iinfo(type) → class 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.iinfo(type) → class 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.experimental.numpy.iinfo(type) → class 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/fft-functions/fft.md: -------------------------------------------------------------------------------- 1 | # fft 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.fft.fft(a, n=None, axis=-1, norm=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.fft.fft(a, n=None, axis=- 1, norm=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.fft.fft(a, n=None, axis=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.fft.fft(a, n=None, axis=- 1, norm=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | mxnet.ndarray.contrib.fft(data=None, compute_size=_Null, out=None, name=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.fft.fft(input, n=None, dim=-1, norm=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.signal.fft(input, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/fft-functions/fft2.md: -------------------------------------------------------------------------------- 1 | # fft2 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.fft.fft2(a, s=None, axes=(-2, -1), norm=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.fft.fft2(a, s=None, axes=(-2, -1), norm=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.fft.fft2(a, s=None, axes=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.fft.fft2(a, s=None, axes=(-2, -1), norm=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.fft.fft2(input, s=None, dim=(-2, -1), norm=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.signal.fft2d(input, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/fft-functions/fftfreq.md: -------------------------------------------------------------------------------- 1 | # fftfreq 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.fft.fftfreq(n, d=1.0) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.fft.fftfreq(n, d=1.0) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.fft.fftfreq(n, d=1.0, chunks='auto') → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.fft.fftfreq(n, d=1.0) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.fft.fftfreq(n, d=1.0, *, dtype=None, layout=torch.strided, device=None, requires_grad=False) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/fft-functions/fftn.md: -------------------------------------------------------------------------------- 1 | # fftn 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.fft.fftn(a, n=None, axis=-1, norm=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.fft.fftn(a, n=None, axis=- 1, norm=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.fft.fftn(a, s=None, axes=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.fft.fftn(a, s=None, axes=None, norm=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.fft.fftn(input, s=None, dim=None, norm=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/fft-functions/fftshift.md: -------------------------------------------------------------------------------- 1 | # fftshift 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.fft.fftshift(x, axes=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.fft.fftshift(x, axes=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.fft.fftshift(x, axes=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.fft.fftshift(x, axes=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.fft.fftshift(input, dim=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/fft-functions/hfft.md: -------------------------------------------------------------------------------- 1 | # hfft 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.fft.hfft(a, n=None, axis=-1, norm=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.fft.hfft(a, n=None, axis=- 1, norm=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.fft.hfft(a, n=None, axis=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.fft.hfft(a, n=None, axis=- 1, norm=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.fft.hfft(input, n=None, dim=-1, norm=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/fft-functions/ifft.md: -------------------------------------------------------------------------------- 1 | # ifft 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.fft.ifft(a, n=None, axis=-1, norm=None) → complex ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.fft.ifft(a, n=None, axis=- 1, norm=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.fft.ifft(a, n=None, axis=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.fft.ifft(a, n=None, axis=- 1, norm=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | mxnet.ndarray.contrib.ifft(data=None, compute_size=_Null, out=None, name=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.fft.ifft(input, n=None, dim=-1, norm=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.signal.ifft(input, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/fft-functions/ifft2.md: -------------------------------------------------------------------------------- 1 | # ifft2 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.fft.ifft2(a, s=None, axes=(-2, -1), norm=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.fft.ifft2(a, s=None, axes=(-2, -1), norm=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.fft.ifft2(a, s=None, axes=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.fft.ifft2(a, s=None, axes=(-2, -1), norm=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.fft.ifft2(input, s=None, dim=(-2, -1), norm=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.signal.ifft2d(input, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/fft-functions/ifftn.md: -------------------------------------------------------------------------------- 1 | # ifftn 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.fft.ifftn(a, s=None, axes=None, norm=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.fft.ifftn(a, s=None, axes=None, norm=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.fft.ifftn(a, s=None, axes=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.fft.ifftn(a, s=None, axes=None, norm=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.fft.ifftn(input, s=None, dim=None, norm=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/fft-functions/ifftshift.md: -------------------------------------------------------------------------------- 1 | # ifftshift 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.fft.ifftshift(x, axes=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.fft.ifftshift(x, axes=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.fft.ifftshift(x, axes=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.fft.ifftshift(x, axes=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.fft.ifftshift(input, dim=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/fft-functions/ihfft.md: -------------------------------------------------------------------------------- 1 | # ihfft 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.fft.ihfft(a, n=None, axis=-1, norm=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.fft.ihfft(a, n=None, axis=- 1, norm=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.fft.ihfft(a, n=None, axis=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.fft.ihfft(a, n=None, axis=- 1, norm=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.fft.ihfft(input, n=None, dim=-1, norm=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/fft-functions/irfft.md: -------------------------------------------------------------------------------- 1 | # irfft 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.fft.ifftn(a, s=None, axes=None, norm=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.fft.ifftn(a, s=None, axes=None, norm=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.fft.ifftn(a, s=None, axes=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.fft.ifftn(a, s=None, axes=None, norm=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.fft.ifftn(input, s=None, dim=None, norm=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/fft-functions/irfft2.md: -------------------------------------------------------------------------------- 1 | # irfft2 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.fft.irfft2(a, s=None, axes=(-2, -1), norm=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.fft.irfft2(a, s=None, axes=(- 2, - 1), norm=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.fft.irfft2(a, s=None, axes=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.fft.irfft2(a, s=None, axes=(- 2, - 1), norm=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.fft.irfft2(input, s=None, dim=(-2, -1), norm=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.signal.irfft2d(input_tensor, fft_length=None, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/fft-functions/irfftn.md: -------------------------------------------------------------------------------- 1 | # irfftn 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.fft.irfftn(a, s=None, axes=None, norm=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.fft.irfftn(a, s=None, axes=None, norm=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.fft.irfftn(a, s=None, axes=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.fft.irfftn(a, s=None, axes=None, norm=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.fft.irfftn(input, s=None, dim=None, norm=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/fft-functions/rfft.md: -------------------------------------------------------------------------------- 1 | # rfft 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.fft.rfft(a, n=None, axis=-1, norm=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.fft.rfft(a, n=None, axis=- 1, norm=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.fft.rfft(a, n=None, axis=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.fft.rfft(a, n=None, axis=- 1, norm=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.fft.rfft(input, n=None, dim=-1, norm=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.signal.rfft(input_tensor, fft_length=None, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/fft-functions/rfft2.md: -------------------------------------------------------------------------------- 1 | # rfft2 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.fft.rfft2(a, s=None, axes=(-2, -1), norm=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.fft.rfft2(a, s=None, axes=(- 2, - 1), norm=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.fft.rfft2(a, s=None, axes=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.fft.rfft2(a, s=None, axes=(- 2, - 1), norm=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.fft.rfft2(input, s=None, dim=(-2, -1), norm=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.signal.rfft2d(input_tensor, fft_length=None, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/fft-functions/rfftfreq.md: -------------------------------------------------------------------------------- 1 | # rfftfreq 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.fft.rfftfreq(n, d=1.0) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.fft.rfftfreq(n, d=1.0) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.fft.rfftfreq(n, d=1.0, chunks='auto') → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.fft.rfftfreq(n, d=1.0) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.fft.rfftfreq(n, d=1.0, *, dtype=None, layout=torch.strided, device=None, requires_grad=False) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/fft-functions/rfftn.md: -------------------------------------------------------------------------------- 1 | # rfftn 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.fft.rfftn(a, s=None, axes=None, norm=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.fft.rfftn(a, s=None, axes=None, norm=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.fft.rfftn(a, s=None, axes=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.fft.rfftn(a, s=None, axes=None, norm=None)→ ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.fft.rfftn(input, s=None, dim=None, norm=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/indexing/take.md: -------------------------------------------------------------------------------- 1 | # take 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.take(a, indices, axis=None, out=None, mode='raise') → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.take(a, indices, axis=None, out=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.take(a, indices, axis=0) → ndarray 19 | ``` 20 | 21 | Default is along the first axis. 22 | 23 | ## JAX 24 | 25 | ``` 26 | jax.numpy.take(a, indices, axis=None, out=None, mode=None) → ndarray 27 | ``` 28 | 29 | ## MXNet 30 | 31 | ``` 32 | mxnet.numpy.take(a, indices, axis=None, mode='raise', out=None) → ndarray 33 | ``` 34 | 35 | ## PyTorch 36 | 37 | ``` 38 | torch.take(input, index) → Tensor 39 | ``` 40 | 41 | Flattens the `input` array. 42 | 43 | ## TensorFlow 44 | 45 | ``` 46 | tf.experimental.numpy.take(a, indices, axis=None, out=None, mode='clip') → Tensor 47 | ``` 48 | -------------------------------------------------------------------------------- /signatures/indexing/take_along_axis.md: -------------------------------------------------------------------------------- 1 | # take_along_axis 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.take_along_axis(arr, indices, axis) → ndarray 7 | ``` 8 | 9 | When `axis` is `None`, flatten for consistency with `sort` and `argsort`. 10 | 11 | ## CuPy 12 | 13 | ``` 14 | cupy.take_along_axis(a, indices, axis) → ndarray 15 | ``` 16 | 17 | ## dask.array 18 | 19 | ``` 20 | 21 | ``` 22 | 23 | - 24 | - 25 | 26 | ## JAX 27 | 28 | ``` 29 | jax.numpy.take_along_axis(arr, indices, axis, mode=None, fill_value=None) → ndarray 30 | ``` 31 | 32 | - "mode" specifies how to handle out-of-bounds indices. 33 | - "fill_value" specifies the value to use when "mode" is "fill" 34 | 35 | ## MXNet 36 | 37 | ``` 38 | 39 | ``` 40 | 41 | ## PyTorch 42 | 43 | ``` 44 | torch.take_along_dim(input, indices, dim=None, *, out=None) → Tensor 45 | ``` 46 | 47 | Supports flattening when `dim=None`. 48 | 49 | ## TensorFlow 50 | 51 | ``` 52 | tf.experimental.numpy.take_along_axis(arr, indices, axis) → Tensor 53 | ``` 54 | -------------------------------------------------------------------------------- /signatures/linalg/cholesky.md: -------------------------------------------------------------------------------- 1 | # cholesky 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.linalg.cholesky(a) → ndarray 7 | ``` 8 | 9 | ## SciPy 10 | 11 | ``` 12 | scipy.linalg.cholesky(a, lower=False, overwrite_a=False, check_finite=True) → ndarray 13 | ``` 14 | 15 | ## CuPy 16 | 17 | ``` 18 | cupy.linalg.cholesky(a) → ndarray 19 | ``` 20 | 21 | ## dask.array 22 | 23 | ``` 24 | dask.array.linalg.cholesky(a, lower=False) → ndarray 25 | ``` 26 | 27 | ## JAX 28 | 29 | ``` 30 | jax.numpy.cholesky(a) → ndarray 31 | ``` 32 | 33 | ## MXNet 34 | 35 | ``` 36 | np.linalg.cholesky(a) → ndarray 37 | ``` 38 | 39 | ## PyTorch 40 | 41 | ``` 42 | torch.cholesky(input, upper=False, *, out=None) → Tensor 43 | ``` 44 | 45 | ## TensorFlow 46 | 47 | ``` 48 | tf.linalg.cholesky(input, name=None) → Tensor 49 | ``` 50 | -------------------------------------------------------------------------------- /signatures/linalg/cross.md: -------------------------------------------------------------------------------- 1 | # cross 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.cross(a, b, axisa=-1, axisb=-1, axisc=-1, axis=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.cross(a, b, axisa=-1, axisb=-1, axisc=-1, axis=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.cross(a, b, axisa=-1, axisb=-1, axisc=-1, axis=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.cross(a, b, axisa=-1, axisb=-1, axisc=-1, axis=None) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.cross(input, other, dim=-1, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.linalg.cross(a, b, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/linalg/det.md: -------------------------------------------------------------------------------- 1 | # det 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.linalg.det(a) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.linalg.det(a) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.linalg.det(a) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.linalg.det(a) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.det(input) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.linalg.det(input, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/linalg/diagonal.md: -------------------------------------------------------------------------------- 1 | # diagonal 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.diagonal(a, offset=0, axis1=0, axis2=1) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.diagonal(a, offset=0, axis1=0, axis2=1) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.diagonal(a, offset=0, axis1=0, axis2=1) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.diagonal(a, offset=0, axis1=0, axis2=1) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.diagonal(a, offset=0, axis1=0, axis2=1) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.diagonal(input, offset=0, dim1=0, dim2=1) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.linalg.diag_part(input, name='diag_part', k=0, padding_value=0, align='RIGHT_LEFT') → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/linalg/dot.md: -------------------------------------------------------------------------------- 1 | # dot 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.dot(a, b, out=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.dot(a, b, out=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.dot(a, b, out=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.dot(a, b, *, precision=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.dot(a, b, out=None) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.dot(input, tensor) → Tensor 37 | ``` 38 | 39 | Latest `master`: 40 | 41 | ``` 42 | torch.dot(input, other, *, out=None) → Tensor 43 | ``` 44 | 45 | Only supports two 1D tensors. 46 | 47 | ## TensorFlow 48 | 49 | ``` 50 | 51 | ``` 52 | -------------------------------------------------------------------------------- /signatures/linalg/eig.md: -------------------------------------------------------------------------------- 1 | # eig 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.linalg.eig(a) → Tuple[ ndarray, ... ] 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.linalg.eig(a) → Tuple[ ndarray, ... ] 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.linalg.eig(a) → Tuple[ ndarray, ... ] 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.eig(input) → Tuple[ Tensor, ... ] 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.linalg.eig(tensor, name=None) → Tuple[ Tensor, ... ] 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/linalg/inv.md: -------------------------------------------------------------------------------- 1 | # inv 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.linalg.inv(a) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.linalg.inv(a) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.linalg.inv(a) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.linalg.inv(a) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.linalg.inv(a) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.inverse(input, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.linalg.inv(input, adjoint=False, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/linalg/lstsq.md: -------------------------------------------------------------------------------- 1 | # lstsq 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.linalg.lstsq(a, b, rcond='warn') → Tuple[ ndarray, ... ] 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.linalg.lstsq(a, b, rcond='warn') → Tuple[ ndarray, ... ] 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.linalg.lstsq(a, b) → Tuple[ ndarray, ... ] 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.linalg.lstsq(a, b, rcond=None, *, numpy_resid=False) → Tuple[ ndarray, ... ] 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.linalg.lstsq(a, b, rcond='warn') → Tuple[ ndarray, ... ] 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.lstsq(input, A, *, out=None) → Tuple[ Tensor, ... ] 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.linalg.lstsq(matrix, rhs, l2_regularizer=0.0, fast=True, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/linalg/matmul.md: -------------------------------------------------------------------------------- 1 | # matmul 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.linalg.matmul(x1, x2, /, out=None, *, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | Supports stacks. 10 | 11 | ## CuPy 12 | 13 | ``` 14 | cupy.matmul(a, b, out=None) → ndarray 15 | ``` 16 | 17 | Supports stacks. 18 | 19 | ## dask.array 20 | 21 | ``` 22 | dask.array.matmul(x1, x2, /, out=None, *, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 23 | ``` 24 | 25 | Supports stacks. 26 | 27 | ## JAX 28 | 29 | ``` 30 | jax.numpy.matmul(a, b, *, precision=None) → ndarray 31 | ``` 32 | 33 | ## MXNet 34 | 35 | ``` 36 | np.linalg.matmul(a, b, out=None) → ndarray 37 | ``` 38 | 39 | Supports stacks. 40 | 41 | ## PyTorch 42 | 43 | ``` 44 | torch.matmul(input, other, *, out=None) → Tensor 45 | ``` 46 | 47 | Supports stacks. 48 | 49 | ## TensorFlow 50 | 51 | ``` 52 | tf.linalg.matmul(a, b, transpose_a=False, transpose_b=False, adjoint_a=False, adjoint_b=False, 53 | a_is_sparse=False, b_is_sparse=False, name=None) → Tensor 54 | ``` 55 | 56 | Supports stacks. 57 | -------------------------------------------------------------------------------- /signatures/linalg/matrix_power.md: -------------------------------------------------------------------------------- 1 | # matrix_power 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.linalg.matrix_power(a, n) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.linalg.matrix_power(a, n) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.linalg.matrix_power(a, n) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.linalg.matrix_power(a, n) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.matrix_power(input, n) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/linalg/matrix_rank.md: -------------------------------------------------------------------------------- 1 | # matrix_rank 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.linalg.matrix_rank(M, tol=None, hermitian=False) → ndarray 7 | ``` 8 | 9 | tol: `S.max() * max(M.shape) * eps` 10 | 11 | ## CuPy 12 | 13 | ``` 14 | cupy.linalg.matrix_rank(M, tol=None) → ndarray 15 | ``` 16 | 17 | `tol` can only be float, not array-like. Does not support stacks. 18 | 19 | ## dask.array 20 | 21 | ``` 22 | 23 | ``` 24 | 25 | ## JAX 26 | 27 | ``` 28 | jax.numpy.linalg.matrix_rank(M, tol=None) → ndarray 29 | ``` 30 | 31 | ## MXNet 32 | 33 | ``` 34 | np.linalg.matrix_rank(M, tol=None, hermitian=False) → ndarray 35 | ``` 36 | 37 | ## PyTorch 38 | 39 | ``` 40 | torch.matrix_rank(input, tol=None, symmetric=False) → Tensor 41 | ``` 42 | 43 | Does not support stacks. 44 | 45 | ``` 46 | torch.linalg.matrix_rank(input, tol=None, hermitian=False, *, out=None) → Tensor 47 | ``` 48 | 49 | `tol` can only be a float, not array-like. 50 | 51 | ## TensorFlow 52 | 53 | ``` 54 | tf.linalg.matrix_rank(a, tol=None, validate_args=False, name=None) → Tensor 55 | ``` 56 | 57 | tol: ` eps * max(rows, cols) * max(singular_val)` 58 | -------------------------------------------------------------------------------- /signatures/linalg/norm.md: -------------------------------------------------------------------------------- 1 | # norm 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.linalg.norm(x, ord=None, axis=None, keepdims=False) → float | ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.linalg.norm(x, ord=None, axis=None, keepdims=False) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.linalg.norm(x, ord=None, axis=None, keepdims=False) → float | array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.linalg.norm(x, ord=None, axis=None, keepdims=False) → float | ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.linalg.norm(x, ord=None, axis=None, keepdims=False) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.norm(input, p='fro', dim=None, keepdim=False, out=None, dtype=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.norm(tensor, ord='euclidean', axis=None, keepdims=None, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/linalg/outer.md: -------------------------------------------------------------------------------- 1 | # outer 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.outer(a, b, out=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.outer(a, b, out=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.outer(a, b) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.outer(a, b, out=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.outer(a, b) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.ger(input, vec2, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.tensordot(a, b, 0, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/linalg/pinv.md: -------------------------------------------------------------------------------- 1 | # pinv 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.linalg.pinv(a, rcond=1e-15, hermitian=False) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.linalg.pinv(a, rcond=1e-15) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.linalg.pinv(a, rcond=) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.linalg.pinv(a, rcond=1e-15, hermitian=False) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.pinverse(input, rcond=1e-15) → Tensor 37 | ``` 38 | 39 | ``` 40 | torch.linalg.pinv(input, rcond=1e-15, hermitian=False) → Tensor 41 | ``` 42 | 43 | ## TensorFlow 44 | 45 | ``` 46 | tf.linalg.pinv(a, rcond=None, validate_args=False, name=None) → Tensor 47 | ``` 48 | -------------------------------------------------------------------------------- /signatures/linalg/qr.md: -------------------------------------------------------------------------------- 1 | # qr 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.linalg.qr(a, mode='reduced') → Tuple[ ndarray, ... ] 7 | ``` 8 | 9 | Does not support stacks. Returns `q`, `r`, `h`, and `tau`. 10 | 11 | ## SciPy 12 | 13 | ``` 14 | scipy.linalg.qr(a, overwrite_a=False, lwork=None, mode='full', pivoting=False, check_finite=True) → Tuple[ ndarray, ... ] 15 | ``` 16 | 17 | Does not support stacks. Returns `q`, `r`, `p`. 18 | 19 | ## CuPy 20 | 21 | ``` 22 | cupy.linalg.qr(a, mode='reduced') → Tuple[ ndarray, ... ] 23 | ``` 24 | 25 | Does not support stacks. Returns `q`, `r`, `h`, and `tau`. 26 | 27 | ## dask.array 28 | 29 | ``` 30 | dask.array.linalg.qr(a) → Tuple[ ndarray, ... ] 31 | ``` 32 | 33 | Does not support stacks. Does not support modes. Returns `q` and `r`. 34 | 35 | ## JAX 36 | 37 | ``` 38 | jax.numpy.linalg.qr(a, mode='reduced') → Tuple[ ndarray, ... ] 39 | ``` 40 | 41 | Does not support stacks. Returns `q`, `r`, `h`, and `tau`. 42 | 43 | ## MXNet 44 | 45 | ``` 46 | np.linalg.qr(a, mode='reduced') → Tuple[ ndarray, ... ] 47 | ``` 48 | 49 | Returns `q` and `r`. Only supports `reduced` mode. 50 | 51 | ## PyTorch 52 | 53 | ``` 54 | torch.qr(input, some=True, *, out=None) → Tuple[ Tensor, ... ] 55 | ``` 56 | 57 | Returns `q` and `r`. 58 | 59 | ``` 60 | torch.linalg.qr(input, mode='reduced', *, out=None) → Tuple[ Tensor, ... ] 61 | ``` 62 | 63 | Returns `q` and `r`. Does not support `raw` mode. For `r` mode, returns `q` as an empty array, always returning a tuple of two tensors. 64 | 65 | ## TensorFlow 66 | 67 | ``` 68 | tf.linalg.qr(input, full_matrices=False, name=None) → Tuple[ Tensor, ... ] 69 | ``` 70 | 71 | Returns `q` and `r`. Effectively only supports `reduced` and `complete` modes. 72 | -------------------------------------------------------------------------------- /signatures/linalg/slogdet.md: -------------------------------------------------------------------------------- 1 | # slogdet 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.linalg.slogdet(a) → Tuple[ ndarray, ... ] 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.linalg.slogdet(a) → Tuple[ ndarray, ... ] 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.linalg.slogdet(a) → Tuple[ ndarray, ... ] 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.linalg.slogdet(a) → Tuple[ ndarray, ... ] 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.slogdet(input) → Tuple[ Tensor, ... ] 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.linalg.slogdet(input, name=None) → Tuple[ Tensor, ... ] 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/linalg/solve.md: -------------------------------------------------------------------------------- 1 | # solve 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.linalg.solve(a, b) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.linalg.solve(a, b) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.linalg.solve(a, b, sym_pos=False) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.linalg.solve(a, b) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.linalg.solve(a, b) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.solve(input, A, *, out=None) → Tuple[ Tensor, ... ] 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.linalg.solve(matrix, rhs, adjoint=False, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/linalg/svd.md: -------------------------------------------------------------------------------- 1 | # svd 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.linalg.svd(a, full_matrices=True, compute_uv=True, hermitian=False) → Tuple[ ndarray, ... ] 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.linalg.svd(a, full_matrices=True, compute_uv=True) → Tuple[ ndarray, ... ] 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.linalg.svd(a, coerce_signs=True) → Tuple[ ndarray, ... ] 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.linalg.svd(a, full_matrices=True, compute_uv=True) → Tuple[ ndarray, ... ] 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.linalg.svd(a) → Tuple[ ndarray, ... ] 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.svd(input, some=True, compute_uv=True, *, out=None) → Tuple[ Tensor, ... ] 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.linalg.svd(tensor, full_matrices=False, compute_uv=True, name=None) → Tuple[ Tensor, ... ] 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/linalg/tensordot.md: -------------------------------------------------------------------------------- 1 | # tensordot 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.tensordot(a, b, axes=2) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.tensordot(a, b, axes=2) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.tensordot(lhs, rhs, axes=2) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.tensordot(a, b, axes=2, *, precision=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.tensordot(a, b, axes=2) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.tensordot(a, b, dims=2) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.tensordot(a, b, axes, name=None) → Tensor 43 | ``` 44 | 45 | Allows providing `axes` as a `(2,K)` shaped array, in addition to an integer or tuple. Returned data type is that of `a`. 46 | -------------------------------------------------------------------------------- /signatures/linalg/trace.md: -------------------------------------------------------------------------------- 1 | # trace 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.trace(a, offset=0, axis1=0, axis2=1, dtype=None, out=None) → scalar | ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.trace(a, offset=0, axis1=0, axis2=1, dtype=None, out=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.trace(offset=0, axis1=0, axis2=1, dtype=None, out=None) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.trace(a, offset=0, axis1=0, axis2=1, dtype=None, out=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.trace(a, offset=0, axis1=0, axis2=1, out=None) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.trace(input) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.linalg.trace(x, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/linalg/transpose.md: -------------------------------------------------------------------------------- 1 | # transpose 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.transpose(a, axes=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.transpose(a, axes=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.transpose(a, axes=None) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.transpose(a, axes=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.transpose(a, axes=None) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.transpose(input, dim0, dim1) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.transpose(a, perm=None, conjugate=False, name='transpose') → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/logical/isfinite.md: -------------------------------------------------------------------------------- 1 | # isfinite 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.isfinite(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.isfinite(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.isfinite(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.isfinite(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.isfinite(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.isfinite(input) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.is_finite(x, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/logical/isinf.md: -------------------------------------------------------------------------------- 1 | # isinf 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.isinf(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.isinf(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.isinf(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.isinf(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.isinf(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.isinf(input) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.is_inf(x, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/logical/isnan.md: -------------------------------------------------------------------------------- 1 | # isnan 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.isnan(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.isnan(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.isnan(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.isnan(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.isnan(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.isnan(input) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.is_nan(x, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/logical/logical_and.md: -------------------------------------------------------------------------------- 1 | # logical_and 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.logical_and(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.logical_and(x1, x2, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.logical_and(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.logical_and(x1, x2) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.logical_and(x1, x2, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.logical_and(input, other, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.logical_and(x, y, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/logical/logical_not.md: -------------------------------------------------------------------------------- 1 | # logical_not 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.logical_not(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.logical_not(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.logical_not(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.logical_not(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.logical_not(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.logical_not(input, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.logical_not(x, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/logical/logical_or.md: -------------------------------------------------------------------------------- 1 | # logical_or 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.logical_or(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.logical_or(x1, x2, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.logical_or(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.logical_or(x1, x2) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.logical_or(x1, x2, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.logical_or(input, other, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.logical_or(x, y, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/logical/logical_xor.md: -------------------------------------------------------------------------------- 1 | # logical_xor 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.logical_xor(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.logical_xor(x1, x2, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.logical_xor(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.logical_xor(x1, x2) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.logical_xor(x1, x2, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.logical_xor(input, other, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.logical_xor(x, y, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/manipulation/broadcast_arrays.md: -------------------------------------------------------------------------------- 1 | # broadcast_arrays 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.broadcast_arrays(*args, subok=False) → List of ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.broadcast_arrays(*args) → list 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.broadcast_arrays(*args, **kwargs) → list of ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.broadcast_arrays(*args) → list of ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.experimental.numpy.broadcast_arrays(*args, **kwargs) → list of ndarray 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/manipulation/broadcast_shapes.md: -------------------------------------------------------------------------------- 1 | # broadcast_shapes 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.broadcast_shapes(*args) → Tuple 7 | ``` 8 | 9 | ## CuPy 10 | 11 | CuPy borrows `broadcast_shapes` from NumPy (see https://github.com/cupy/cupy/blob/a888cc94c79729cf24ebb808d15b9702c0342392/cupy/__init__.py#L302) 12 | 13 | ``` 14 | cupy.broadcast_shapes(*args) → Tuple 15 | ``` 16 | 17 | ## dask.array 18 | 19 | Appears to support but not in docs: 20 | 21 | ``` 22 | dask.array.broadcast_shapes(*args) → Tuple 23 | ``` 24 | 25 | ## JAX 26 | 27 | ``` 28 | jax.numpy.broadcast_shapes(*shapes) → Tuple 29 | ``` 30 | 31 | ## PyTorch 32 | 33 | ``` 34 | torch.broadcast_shapes(*shapes) → Size 35 | ``` 36 | 37 | ## TensorFlow 38 | 39 | ``` 40 | tf.broadcast_static_shape(shape_x, shape_y) → TensorShape 41 | ``` 42 | 43 | ``` 44 | tf.broadcast_dynamic_shape(shape_x, shape_y) → Tensor 45 | ``` 46 | -------------------------------------------------------------------------------- /signatures/manipulation/broadcast_to.md: -------------------------------------------------------------------------------- 1 | # broadcast_to 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.broadcast_to(array, shape, subok=False) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.broadcast_to(array, shape) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.broadcast_to(x, shape, chunks=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.broadcast_to(arr, shape) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | mxnet.ndarray.broadcast_to(data=None, shape=_Null, out=None, name=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.experimental.numpy.broadcast_to(array, shape) → ndarray 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/manipulation/concat.md: -------------------------------------------------------------------------------- 1 | # concat 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.concatenate((a1, a2, ...), axis=0, out=None, dtype=None, casting="same_kind") → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.concatenate(tup, axis=0) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.concatenate(seq, axis=0, allow_unknown_chunksizes=False) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.concatenate(arrays, axis=0) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.concatenate(seq, axis=0, out=None) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.cat(tensors, dim=0, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.concat(values, axis, name='concat') → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/manipulation/expand_dims.md: -------------------------------------------------------------------------------- 1 | # expand_dims 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.expand_dims(a, axis) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.expand_dims(a, axis) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.expand_dims(a, axis) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.expand_dims(a, axis) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.unsqueeze(input, dim) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.expand_dims(input, axis, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/manipulation/flip.md: -------------------------------------------------------------------------------- 1 | # flip 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.flip(m, axis=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.flip(a, axis) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.flip(m, axis) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.flip(m, axis=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.flip(m, axis=None, out=None) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.flip(input, dims) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.reverse(tensor, axis, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/manipulation/moveaxis.md: -------------------------------------------------------------------------------- 1 | # moveaxis 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.moveaxis(a, source, destination) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.moveaxis(a, source, destination) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.moveaxis(a, source, destination) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.moveaxis(a, source, destination) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.moveaxis(a, source, destination) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.moveaxis(input, source, destination) → Tensor 37 | ``` 38 | 39 | Alias: `movedim`. 40 | 41 | ## TensorFlow 42 | 43 | ``` 44 | tf.experimental.numpy.moveaxis(a, source, destination) → Tensor 45 | ``` 46 | -------------------------------------------------------------------------------- /signatures/manipulation/repeat.md: -------------------------------------------------------------------------------- 1 | # repeat 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.repeat(a, repeats, axis=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.repeat(a, repeats, axis=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.repeat(a, repeats, axis=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.repeat(a, repeats, axis=None, *, total_repeat_length=None) → ndarray 25 | ``` 26 | 27 | Note: requires `total_repeat_length` to be provided in order to be compilable. 28 | 29 | ## MXNet 30 | 31 | ``` 32 | np.repeat(a, repeats, axis=None) → ndarray 33 | ``` 34 | 35 | ## PyTorch 36 | 37 | ``` 38 | torch.repeat_interleave(input, repeats, dim=None, *, output_size=None) → Tensor 39 | ``` 40 | 41 | Note: `torch.Tensor.repeat` behaves similar to NumPy `tile`. 42 | 43 | ## TensorFlow 44 | 45 | ``` 46 | tf.repeat(input, repeats, axis=None, name=None) → Tensor 47 | ``` 48 | -------------------------------------------------------------------------------- /signatures/manipulation/reshape.md: -------------------------------------------------------------------------------- 1 | # reshape 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.reshape(a, newshape, order='C') → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.reshape(a, newshape, order='C')) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.reshape(x, shape) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.reshape(a, newshape, order='C') → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.reshape(a, newshape, reverse=False, order='C') → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.reshape(input, shape) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.reshape(tensor, shape, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/manipulation/roll.md: -------------------------------------------------------------------------------- 1 | # roll 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.roll(a, shift, axis=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.roll(a, shift, axis=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.roll(array, shift, axis=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.roll(a, shift, axis=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.roll(a, shift, axis=None) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.roll(input, shifts, dims=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.roll(input, shift, axis, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/manipulation/squeeze.md: -------------------------------------------------------------------------------- 1 | # squeeze 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.squeeze(a, axis=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.squeeze(a, axis=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.squeeze(a, axis=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.squeeze(a, axis=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.squeeze(x, axis=None) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.squeeze(input, dim=None, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.squeeze(input, axis=None, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/manipulation/stack.md: -------------------------------------------------------------------------------- 1 | # stack 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.stack(arrays, axis=0, out=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.stack(tup, axis=0) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.stack(seq, axis=0, allow_unknown_chunksizes=False) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.stack(arrays, axis=0) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.stack(arrays, axis=0, out=None) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.stack(tensors, dim=0, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.stack(values, axis=0, name='stack') → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/manipulation/tile.md: -------------------------------------------------------------------------------- 1 | # tile 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.tile(a, reps) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.tile(a, reps) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.tile(a, reps) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.tile(a, reps) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.tile(a, reps) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.tile(input, dims) → Tensor 37 | ``` 38 | 39 | Note: `torch.Tensor.repeat` behaves similar to NumPy `tile`. 40 | 41 | ## TensorFlow 42 | 43 | ``` 44 | tf.tile(input, multiples, name=None) → Tensor 45 | ``` 46 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/README.md: -------------------------------------------------------------------------------- 1 | # Elementary Mathematical Functions 2 | 3 | > Generalized signatures for element-wise elementary mathematical functions. 4 | 5 | ## NumPy 6 | 7 | ``` 8 | numpy.(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 9 | ``` 10 | 11 | ## CuPy 12 | 13 | ``` 14 | cupy.(x, out=None, dtype=None) → ndarray 15 | ``` 16 | 17 | ## dask.array 18 | 19 | ``` 20 | dask.array.(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → array 21 | ``` 22 | 23 | ## JAX 24 | 25 | ``` 26 | jax.numpy.(x) → ndarray 27 | ``` 28 | 29 | ## MXNet 30 | 31 | ``` 32 | np.(x, out=None, **kwargs) → ndarray 33 | ``` 34 | 35 | ## PyTorch 36 | 37 | ``` 38 | torch.(input, out=None) → Tensor 39 | ``` 40 | 41 | ## TensorFlow 42 | 43 | ``` 44 | tf.math.(x, name=None) → Tensor 45 | ``` 46 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/abs.md: -------------------------------------------------------------------------------- 1 | # abs 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.absolute(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.absolute(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.fabs(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.abs(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.absolute(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.abs(input, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.abs(x, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/acos.md: -------------------------------------------------------------------------------- 1 | # acos 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.arccos(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.arccos(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.arccos(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.arccos(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.arccos(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.acos(input, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.acos(x, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/acosh.md: -------------------------------------------------------------------------------- 1 | # acosh 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.arccosh(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.arccosh(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.arccosh(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.arccosh(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.arccosh(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.acosh(x, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/asin.md: -------------------------------------------------------------------------------- 1 | # asin 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.arcsin(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.arcsin(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.arcsin(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.arcsin(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.arcsin(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.asin(input, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.asin(x, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/asinh.md: -------------------------------------------------------------------------------- 1 | # asinh 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.arcsinh(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.arcsinh(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.arcsinh(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.arcsinh(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.arcsinh(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.asinh(x, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/atan.md: -------------------------------------------------------------------------------- 1 | # atan 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.arctan(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.arctan(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.arctan(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.arctan(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.arctan(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.atan(input, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.atan(x, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/atan2.md: -------------------------------------------------------------------------------- 1 | # atan2 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.arctan2(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.arctan2(x1, x2, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.arctan2(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.arctan2(x1, x2) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.arctan2(x1, x2, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.atan2(input, other, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.atan2(y, x, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/atanh.md: -------------------------------------------------------------------------------- 1 | # atanh 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.arctanh(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.arctanh(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.arctanh(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.arctanh(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.arctanh(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.atanh(x, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/ceil.md: -------------------------------------------------------------------------------- 1 | # ceil 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.ceil(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.ceil(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.ceil(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.ceil(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.ceil(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.ceil(input, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.ceil(x, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/conj.md: -------------------------------------------------------------------------------- 1 | # conj 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.conj(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.conj(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.conj(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.conj(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.conj(input) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.conj(x, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/cos.md: -------------------------------------------------------------------------------- 1 | # cos 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.cos(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.cos(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.cos(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.cos(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.cos(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.cos(input, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.cos(x, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/cosh.md: -------------------------------------------------------------------------------- 1 | # cosh 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.cosh(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.cosh(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.cosh(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.cosh(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.cosh(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.cosh(input, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.cosh(x, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/diff.md: -------------------------------------------------------------------------------- 1 | # diff 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.diff(a, n=1, axis=-1, prepend=, append=) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.diff(a, n=1, axis=-1, prepend=None, append=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.diff(a, n=1, axis=- 1, prepend=None, append=None) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.diff(a, n=1, axis=-1, prepend=None, append=None) → ndarray 25 | ``` 26 | 27 | `prepend` and `append` must be array-like. 28 | 29 | ## PyTorch 30 | 31 | ``` 32 | torch.diff(input, n=1, dim=-1, prepend=None, append=None) → Tensor 33 | ``` 34 | 35 | ## TensorFlow 36 | 37 | ``` 38 | tf.experimental.numpy.diff(a, n=1, axis=-1) → Tensor 39 | ``` 40 | 41 | No support for `prepend` and `append` (as of v2.16.1). 42 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/exp.md: -------------------------------------------------------------------------------- 1 | # exp 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.exp(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.exp(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.exp(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.exp(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.exp(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.exp(input, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.exp(x, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/expm1.md: -------------------------------------------------------------------------------- 1 | # expm1 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.expm1(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.expm1(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.expm1(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.expm1(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.expm1(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.expm1(input, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.expm1(x, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/floor.md: -------------------------------------------------------------------------------- 1 | # floor 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.floor(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.floor(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.floor(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.floor(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.floor(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.floor(input, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.floor(x, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/log.md: -------------------------------------------------------------------------------- 1 | # log 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.log(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.log(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.log(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.log(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.log(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.log(input, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.log(x, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/log10.md: -------------------------------------------------------------------------------- 1 | # log10 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.log10(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.log10(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.log10(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.log10(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.log10(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.log10(input, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/log1p.md: -------------------------------------------------------------------------------- 1 | # log1p 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.log1p(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.log1p(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.log1p(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.log1p(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.log1p(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.log1p(input, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.log1p(x, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/log2.md: -------------------------------------------------------------------------------- 1 | # log2 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.log2(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.log2(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.log2(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.log2(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.log2(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.log2(input, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/logaddexp.md: -------------------------------------------------------------------------------- 1 | # logaddexp 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.logaddexp(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.logaddexp(x1, x2, out=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.logaddexp(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.logaddexp(x1, x2) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.logaddexp(x1, x2, out=None) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.logaddexp(input, other, *, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.experimental.numpy.logaddexp(x1, x2) → Tensor 43 | ``` -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/negative.md: -------------------------------------------------------------------------------- 1 | # negative 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.negative(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.negative(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.negative(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.negative(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.neg(input, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.negative(x, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/nextafter.md: -------------------------------------------------------------------------------- 1 | # nextafter 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.nextafter(x1, x2, out=None, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.nextafter(x1, x2, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.nextafter(x1, x2, out=None, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.lax.nextafter(x1, x2) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | ``` 31 | 32 | ## PyTorch 33 | 34 | ``` 35 | torch.nextafter(input, other, out=None) → Tensor 36 | ``` 37 | 38 | ## TensorFlow 39 | 40 | ``` 41 | tf.math.nextafter( x1, x2, name=None ) → Tensor 42 | ``` 43 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/positive.md: -------------------------------------------------------------------------------- 1 | # positive 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.positive(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.positive(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.positive(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/pow.md: -------------------------------------------------------------------------------- 1 | # pow 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.power(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.power(x1, x2, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.power(x1, x2) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.power(x1, x2, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.pow(input, exponent, out=None) → Tensor 37 | torch.pow(self, exponent, out=None) → Tensor 38 | ``` 39 | 40 | ## TensorFlow 41 | 42 | ``` 43 | tf.math.pow(x, y, name=None) → Tensor 44 | ``` 45 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/reciprocal.md: -------------------------------------------------------------------------------- 1 | # reciprocal 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.reciprocal(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.reciprocal(x, /, out=None, *, casting='same_kind', dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.reciprocal(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.reciprocal(x, /) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.reciprocal(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.reciprocal(input, *, out=None) → Tensor 37 | ``` 38 | 39 | Supports integral inputs, which are subsequently promoted to default scalar dtype. 40 | 41 | ## TensorFlow 42 | 43 | ``` 44 | tf.math.reciprocal(x, name=None) → Tensor 45 | ``` 46 | 47 | Supports all numeric dtypes. 48 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/round.md: -------------------------------------------------------------------------------- 1 | # round 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.rint(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.rint(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.rint(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.rint(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.rint(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.round(input, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.round(x, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/sign.md: -------------------------------------------------------------------------------- 1 | # sign 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.sign(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.sign(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.sign(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.sign(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.sign(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.sign(input, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.sign(x, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/signbit.md: -------------------------------------------------------------------------------- 1 | # signbit 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.signbit(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.signbit(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.signbit(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.signbit(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.signbit(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.signbit(input, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.experimental.numpy.signbit(x) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/sin.md: -------------------------------------------------------------------------------- 1 | # sin 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.sin(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.sin(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.sin(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.sin(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.sin(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.sin(input, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.sin(x, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/sinh.md: -------------------------------------------------------------------------------- 1 | # sinh 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.sinh(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.sinh(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.sinh(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.sinh(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.sinh(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.sinh(input, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.sinh(x, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/sqrt.md: -------------------------------------------------------------------------------- 1 | # sqrt 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.sqrt(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.sqrt(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.sqrt(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.sqrt(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.sqrt(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.sqrt(input, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.sqrt(x, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/square.md: -------------------------------------------------------------------------------- 1 | # sign 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.square(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.square(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.square(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.square(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.square(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.square(input, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.square(x, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/tan.md: -------------------------------------------------------------------------------- 1 | # tan 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.tan(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.tan(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.tan(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.tan(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.tan(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.tan(input, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.tan(x, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/tanh.md: -------------------------------------------------------------------------------- 1 | # tanh 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.tanh(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.tanh(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.tanh(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.tanh(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.tanh(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.tanh(input, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.tanh(x, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/mathematical-functions-elementwise/trunc.md: -------------------------------------------------------------------------------- 1 | # trunc 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.trunc(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.trunc(x, out=None, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.trunc(x, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → array 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.trunc(x) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.trunc(x, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.trunc(input, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.truncatediv(x, y, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/searching/argmax.md: -------------------------------------------------------------------------------- 1 | # argmax 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.argmax(a, axis=None, out=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.argmax(a, axis=None, dtype=None, out=None, keepdims=False) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.argmax(a, axis=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.argmax(a, axis=None, out=None) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.argmax(input) → LongTensor 37 | torch.argmax(input, dim, keepdim=False) → LongTensor 38 | ``` 39 | 40 | ## TensorFlow 41 | 42 | ``` 43 | tf.argmax(input, axis=None, output_type=tf.dtypes.int64, name=None) → Tensor 44 | ``` 45 | -------------------------------------------------------------------------------- /signatures/searching/argmin.md: -------------------------------------------------------------------------------- 1 | # argmin 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.argmin(a, axis=None, out=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.argmin(a, axis=None, dtype=None, out=None, keepdims=False) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.argmin(a, axis=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.argmin(a, axis=None, out=None) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.argmin(input) → LongTensor 37 | torch.argmin(input, dim, keepdim=False) → LongTensor 38 | ``` 39 | 40 | ## TensorFlow 41 | 42 | ``` 43 | tf.argmin(input, axis=None, output_type=tf.dtypes.int64, name=None) → Tensor 44 | ``` 45 | -------------------------------------------------------------------------------- /signatures/searching/argwhere.md: -------------------------------------------------------------------------------- 1 | # argwhere 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.argwhere(a) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.argwhere(a) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.argwhere(a) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/searching/nonzero.md: -------------------------------------------------------------------------------- 1 | # nonzero 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.nonzero(a) → tuple[ ndarray, ... ] 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.nonzero(a) → tuple[ ndarray, ... ] 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.nonzero(a) → tuple[ ndarray, ... ] 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.nonzero(a) → tuple[ ndarray, ... ] 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.nonzero(a) → tuple[ ndarray, ... ] 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.nonzero(input, *, out=None, as_tuple=False) → LongTensor | tuple[ LongTensor, ... ] 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/searching/searchsorted.md: -------------------------------------------------------------------------------- 1 | # searchsorted 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.searchsorted(a, v, side='left', sorter=None) → ndarray 7 | ``` 8 | 9 | Supports 1D. 10 | 11 | ## CuPy 12 | 13 | ``` 14 | cupy.searchsorted(a, v, side='left', sorter=None) → ndarray 15 | ``` 16 | 17 | Supports 1D. 18 | 19 | ## dask.array 20 | 21 | ``` 22 | dask.array.searchsorted(a, v, side='left', sorter=None) → ndarray 23 | ``` 24 | 25 | ## JAX 26 | 27 | ``` 28 | jax.numpy.searchsorted(a, v, side='left', sorter=None, *, method='scan') → ndarray 29 | ``` 30 | 31 | `method` controls device and array size performance optimizations. 32 | 33 | ## MXNet 34 | 35 | ``` 36 | np.searchsorted(a, v, side='left', sorter=None) → ndarray 37 | ``` 38 | 39 | ## PyTorch 40 | 41 | ``` 42 | torch.searchsorted(sorted_sequence, values, *, out_int32=False, right=False, side='left', out=None, sorter=None) → Tensor 43 | ``` 44 | 45 | `side` is preferred over `right`. Supports N-D (supports stacking). 46 | 47 | ## TensorFlow 48 | 49 | ``` 50 | tf.searchsorted(sorted_sequence, values, side='left', out_type=tf.dtypes.int32, name=None) → Tensor 51 | ``` 52 | 53 | Does not support `sorter`. 54 | -------------------------------------------------------------------------------- /signatures/searching/where.md: -------------------------------------------------------------------------------- 1 | # where 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.where(condition[, x, y]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.where(condition, x=None, y=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.where(condition[, x, y]) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.where(condition, x=None, y=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.where(condition, x=None, y=None) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.where(condition) → tuple[ LongTensor, ... ] 37 | torch.where(condition, x, y) → Tensor 38 | ``` 39 | 40 | ## TensorFlow 41 | 42 | ``` 43 | tf.where(condition, x=None, y=None, name=None) → Tensor 44 | ``` 45 | -------------------------------------------------------------------------------- /signatures/sets/unique.md: -------------------------------------------------------------------------------- 1 | # unique 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.unique(ar, return_index=False, return_inverse=False, return_counts=False, axis=None) → ndarray | tuple[ ndarray, ... ] 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.unique(ar, return_index=False, return_inverse=False, return_counts=False, axis=None) → ndarray | tuple[ ndarray, ... ] 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.unique(ar, return_index=False, return_inverse=False, return_counts=False) → ndarray | tuple[ ndarray, ... ] 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.unique(ar, return_index=False, return_inverse=False, return_counts=False, axis=None) → ndarray | tuple[ ndarray, ... ] 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.unique(ar, return_index=False, return_inverse=False, return_counts=False, axis=None) → ndarray | tuple[ ndarray, ... ] 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.unique(input, sorted=False, return_inverse=False, return_counts=False, dim=None) → Tensor | tuple[ Tensor, ... ] 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.unique(x, out_idx=tf.dtypes.int32, name=None) → tuple[ Tensor, ... ] 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/sorting/argsort.md: -------------------------------------------------------------------------------- 1 | # argsort 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.argsort(a, axis=-1, kind=None, order=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.argsort(a, axis=-1) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.argsort(a, axis=-1, kind='quicksort', order=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.argsort(a, axis=-1, kind=None, order=None) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.argsort(input, dim=-1, descending=False) → LongTensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.argsort(values, axis=-1, direction='ASCENDING', stable=False, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/sorting/sort.md: -------------------------------------------------------------------------------- 1 | # sort 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.sort(a, axis=-1, kind=None, order=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.sort(a, axis=-1) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.sort(a, axis=-1, kind='quicksort', order=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.sort(a, axis=-1, kind=None, order=None) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.sort(input, dim=-1, descending=False, out=None) → (Tensor, LongTensor) 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.sort(values, axis=-1, direction='ASCENDING', name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/statistics/README.md: -------------------------------------------------------------------------------- 1 | # Statistical Functions 2 | 3 | > Generalized signatures for basic statistical functions. 4 | 5 | ## NumPy 6 | 7 | ``` 8 | numpy.(a, axis=None, dtype=None, out=None, keepdims=) → ndarray 9 | ``` 10 | 11 | ## CuPy 12 | 13 | ``` 14 | cupy.(a, axis=None, dtype=None, out=None, keepdims=False) → ndarray 15 | ``` 16 | 17 | ## dask.array 18 | 19 | ``` 20 | dask.array.(a, axis=None, dtype=None, keepdims=False, split_every=None, out=None) → ndarray 21 | ``` 22 | 23 | ## JAX 24 | 25 | ``` 26 | jax.numpy.(a, axis=None, dtype=None, out=None, keepdims=False) → ndarray 27 | ``` 28 | 29 | ## MXNet 30 | 31 | ``` 32 | np.(a, axis=None, dtype=None, out=None, keepdims=False) → ndarray 33 | ``` 34 | 35 | ## PyTorch 36 | 37 | ``` 38 | torch.(input, dim, keepdim=False, out=None) → Tensor 39 | ``` 40 | 41 | ## TensorFlow 42 | 43 | ``` 44 | tf.math.reduce_(input_tensor, axis=None, keepdims=False, name=None) → Tensor 45 | ``` 46 | -------------------------------------------------------------------------------- /signatures/statistics/count_nonzero.md: -------------------------------------------------------------------------------- 1 | # count_nonzero 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.count_nonzero(a, axis=None, *, keepdims=False) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.count_nonzero(a, axis=None) → ndarray 13 | ``` 14 | 15 | No support for `keepdims`. 16 | 17 | ## dask.array 18 | 19 | ``` 20 | dask.array.count_nonzero(a, axis=None) → ndarray 21 | ``` 22 | 23 | No support for `keepdims`. 24 | 25 | ## JAX 26 | 27 | ``` 28 | jax.numpy.count_nonzero(a, axis=None, keepdims=False) → ndarray 29 | ``` 30 | 31 | ## MXNet 32 | 33 | ``` 34 | np.count_nonzero(a, axis=None, *, keepdims=False) → ndarray 35 | ``` 36 | 37 | ## PyTorch 38 | 39 | ``` 40 | torch.count_nonzero(input, dim=None) → Tensor 41 | ``` 42 | 43 | No support for `keepdims`. 44 | 45 | ## TensorFlow 46 | 47 | ``` 48 | tf.math.count_nonzero(input, axis=None, keepdims=False, dtype=tf.dtypes.int64, name=None) → Tensor 49 | ``` 50 | -------------------------------------------------------------------------------- /signatures/statistics/cumulative_prod.md: -------------------------------------------------------------------------------- 1 | # cumulative_prod 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.cumprod(a, axis=None, dtype=None, out=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.cumprod(a, axis=None, dtype=None, out=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.cumprod(x, axis=None, dtype=None, out=None, method='sequential') → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.cumprod(a, axis=None, dtype=None, out=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.cumprod(a, axis=None, dtype=None, out=None) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.cumprod(input, dim, *, dtype=None, out=None) → Tensor 37 | ``` 38 | 39 | `dim` positional/kwarg argument is required. 40 | 41 | ## TensorFlow 42 | 43 | ``` 44 | tf.math.cumprod(x, axis=0, exclusive=False, reverse=False, name=None) → Tensor 45 | ``` 46 | 47 | Uses `exclusive` kwarg to indicate whether to include the starting value and exclude the ending value 48 | -------------------------------------------------------------------------------- /signatures/statistics/cumulative_sum.md: -------------------------------------------------------------------------------- 1 | # cumulative_sum 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.cumsum(a, axis=None, dtype=None, out=None) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.cumsum(a, axis=None, dtype=None, out=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.cumsum(x, axis=None, dtype=None, out=None, method='sequential') → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.cumsum(a, axis=None, dtype=None, out=None) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.cumsum(a, axis=None, dtype=None, out=None) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.cumsum(input, dim, *, dtype=None, out=None) → Tensor 37 | ``` 38 | 39 | `dim` positional/kwarg argument is required. 40 | 41 | ## TensorFlow 42 | 43 | ``` 44 | tf.math.cumsum(x, axis=0, exclusive=False, reverse=False, name=None) → Tensor 45 | ``` 46 | 47 | Uses `exclusive` kwarg to indicate whether to include the starting value and exclude the ending value 48 | -------------------------------------------------------------------------------- /signatures/statistics/max.md: -------------------------------------------------------------------------------- 1 | # max 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.amax(a, axis=None, out=None, keepdims=, initial=, where=) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.amax(a, axis=None, out=None, keepdims=False, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.amax(x, axis=None, split_every=None, out=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.amax(a, axis=None, dtype=None, out=None, keepdims=False) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.max(input, dim, keepdim=False, out=None) → (Tensor, Tensor) 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.reduce_max(input_tensor, axis=None, keepdims=False, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/statistics/maximum.md: -------------------------------------------------------------------------------- 1 | # maximum 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.maximum(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.maximum(x1, x2, /, out=None, *, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.maximum(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.maximum(x1, x2, /) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.maximum(x1, x2, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.maximum(input, other, *, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.maximum(x, y, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/statistics/mean.md: -------------------------------------------------------------------------------- 1 | # mean 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.mean(a, axis=None, dtype=None, out=None, keepdims=) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.mean(a, axis=None, dtype=None, out=None, keepdims=False) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.mean(a, axis=None, dtype=None, keepdims=False, split_every=None, out=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.mean(a, axis=None, dtype=None, out=None, keepdims=False) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.mean(a, axis=None, dtype=None, out=None, keepdims=False) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.mean(input, dim, keepdim=False, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.reduce_mean(input_tensor, axis=None, keepdims=False, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/statistics/min.md: -------------------------------------------------------------------------------- 1 | # min 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.amin(a, axis=None, out=None, keepdims=, initial=, where=) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.amin(a, axis=None, out=None, keepdims=False, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.amin(x, axis=None, split_every=None, out=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.amin(a, axis=None, dtype=None, out=None, keepdims=False) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.min(input, dim, keepdim=False, out=None) → (Tensor, Tensor) 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.reduce_min(input_tensor, axis=None, keepdims=False, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/statistics/minimum.md: -------------------------------------------------------------------------------- 1 | # minimum 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.minimum(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.minimum(x1, x2, /, out=None, *, dtype=None) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.minimum(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.minimum(x1, x2, /) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.minimum(x1, x2, out=None, **kwargs) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.minimum(input, other, *, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.minimum(x, y, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/statistics/prod.md: -------------------------------------------------------------------------------- 1 | # prod 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.prod(a, axis=None, dtype=None, out=None, keepdims=, initial=, where=) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.prod(a, axis=None, dtype=None, out=None, keepdims=False) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.prod(a, axis=None, dtype=None, keepdims=False, split_every=None, out=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.prod(a, axis=None, dtype=None, out=None, keepdims=False) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.prod(a, axis=None, dtype=None, out=None, keepdims=False) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.prod(input, dim, keepdim=False, dtype=True) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.reduce_prod(input_tensor, axis=None, keepdims=False, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/statistics/std.md: -------------------------------------------------------------------------------- 1 | # std 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.std(a, axis=None, dtype=None, out=None, ddof=0, keepdims=) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.std(a, axis=None, dtype=None, out=None, ddof=0, keepdims=False) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.std(a, axis=None, dtype=None, keepdims=False, ddof=0, split_every=None, out=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.std(a, axis=None, dtype=None, out=None, ddof=0, keepdims=False) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.std(a, axis=None, dtype=None, out=None, ddof=0, keepdims=False) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.std(input, dim, keepdim=False, unbiased=True, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.reduce_std(input_tensor, axis=None, keepdims=False, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/statistics/sum.md: -------------------------------------------------------------------------------- 1 | # sum 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.sum(a, axis=None, dtype=None, out=None, keepdims=, initial=, where=) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.sum(a, axis=None, dtype=None, out=None, keepdims=False) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.sum(a, axis=None, dtype=None, keepdims=False, split_every=None, out=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.sum(a, axis=None, dtype=None, out=None, keepdims=False) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.sum(a, axis=None, dtype=None, out=None, initial=0, keepdims=False) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.sum(input, dim, keepdim=False, dtype=True) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.reduce_sum(input_tensor, axis=None, keepdims=False, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/statistics/var.md: -------------------------------------------------------------------------------- 1 | # var 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.var(a, axis=None, dtype=None, out=None, ddof=0, keepdims=) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.var(a, axis=None, dtype=None, out=None, ddof=0, keepdims=False) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.var(a, axis=None, dtype=None, keepdims=False, ddof=0, split_every=None, out=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.var(a, axis=None, dtype=None, out=None, ddof=0, keepdims=False) → ndarray 25 | ``` 26 | 27 | ## MXNet 28 | 29 | ``` 30 | np.var(a, axis=None, dtype=None, out=None, ddof=0, keepdims=False) → ndarray 31 | ``` 32 | 33 | ## PyTorch 34 | 35 | ``` 36 | torch.var(input, dim, keepdim=False, unbiased=True, out=None) → Tensor 37 | ``` 38 | 39 | ## TensorFlow 40 | 41 | ``` 42 | tf.math.reduce_variance(input_tensor, axis=None, keepdims=False, name=None) → Tensor 43 | ``` 44 | -------------------------------------------------------------------------------- /signatures/utilities/all.md: -------------------------------------------------------------------------------- 1 | # all 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.all(a, axis=None, out=None, keepdims=) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.all(a, axis=None, out=None, keepdims=False) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.all(a, axis=None, keepdims=False, split_every=None, out=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.all(a, axis=None, dtype=None, out=None, keepdims=False) → ndarray 25 | jax.numpy.alltrue(a, axis=None, dtype=None, out=None, keepdims=False) → ndarray 26 | ``` 27 | 28 | ## MXNet 29 | 30 | ``` 31 | np.all(a, axis=None, out=None, keepdims=False) → ndarray 32 | ``` 33 | 34 | ## PyTorch 35 | 36 | ``` 37 | 38 | ``` 39 | 40 | ## TensorFlow 41 | 42 | ``` 43 | tf.math.reduce_all(input_tensor, axis=None, keepdims=False, name=None) → Tensor 44 | ``` 45 | -------------------------------------------------------------------------------- /signatures/utilities/any.md: -------------------------------------------------------------------------------- 1 | # any 2 | 3 | ## NumPy 4 | 5 | ``` 6 | numpy.any(a, axis=None, out=None, keepdims=) → ndarray 7 | ``` 8 | 9 | ## CuPy 10 | 11 | ``` 12 | cupy.any(a, axis=None, out=None, keepdims=False) → ndarray 13 | ``` 14 | 15 | ## dask.array 16 | 17 | ``` 18 | dask.array.any(a, axis=None, keepdims=False, split_every=None, out=None) → ndarray 19 | ``` 20 | 21 | ## JAX 22 | 23 | ``` 24 | jax.numpy.any(a, axis=None, dtype=None, out=None, keepdims=False) → ndarray 25 | jax.numpy.sometrue(a, axis=None, dtype=None, out=None, keepdims=False) → ndarray 26 | ``` 27 | 28 | ## MXNet 29 | 30 | ``` 31 | np.any(a, axis=None, out=None, keepdims=False) → ndarray 32 | ``` 33 | 34 | ## PyTorch 35 | 36 | ``` 37 | 38 | ``` 39 | 40 | ## TensorFlow 41 | 42 | ``` 43 | tf.math.reduce_any(input_tensor, axis=None, keepdims=False, name=None) → Tensor 44 | ``` 45 | -------------------------------------------------------------------------------- /tools/make/common.mk: -------------------------------------------------------------------------------- 1 | #/ 2 | # @license MIT 3 | # 4 | # Copyright (c) 2020 Python Data APIs Consortium. 5 | # 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy 7 | # of this software and associated documentation files (the "Software"), to deal 8 | # in the Software without restriction, including without limitation the rights 9 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | # copies of the Software, and to permit persons to whom the Software is 11 | # furnished to do so, subject to the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included in all 14 | # copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | # SOFTWARE. 23 | #/ 24 | 25 | # VARIABLES # 26 | 27 | # Verbosity: 28 | ifndef VERBOSE 29 | QUIET := @ 30 | else 31 | QUIET := 32 | endif 33 | 34 | # Determine the OS: 35 | # 36 | # [1]: https://en.wikipedia.org/wiki/Uname#Examples 37 | # [2]: http://stackoverflow.com/a/27776822/2225624 38 | OS ?= $(shell uname) 39 | ifneq (, $(findstring MINGW,$(OS))) 40 | OS := WINNT 41 | else 42 | ifneq (, $(findstring MSYS,$(OS))) 43 | OS := WINNT 44 | else 45 | ifneq (, $(findstring CYGWIN,$(OS))) 46 | OS := WINNT 47 | else 48 | ifneq (, $(findstring Windows_NT,$(OS))) 49 | OS := WINNT 50 | endif 51 | endif 52 | endif 53 | endif 54 | 55 | # Define the delete command: 56 | DELETE ?= -rm 57 | DELETE_FLAGS ?= -rf 58 | 59 | # Define the command to `cat` a file: 60 | CAT ?= cat 61 | 62 | # Define the command for `node`: 63 | NODE ?= node 64 | 65 | # Define the command for `npm`: 66 | NPM ?= npm 67 | 68 | # Determine the `open` command: 69 | ifeq ($(OS), Darwin) 70 | OPEN ?= open 71 | else 72 | OPEN ?= xdg-open 73 | endif 74 | # TODO: add Windows command 75 | -------------------------------------------------------------------------------- /tools/make/debug.mk: -------------------------------------------------------------------------------- 1 | #/ 2 | # @license MIT 3 | # 4 | # Copyright (c) 2020 Python Data APIs Consortium. 5 | # 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy 7 | # of this software and associated documentation files (the "Software"), to deal 8 | # in the Software without restriction, including without limitation the rights 9 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | # copies of the Software, and to permit persons to whom the Software is 11 | # furnished to do so, subject to the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included in all 14 | # copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | # SOFTWARE. 23 | #/ 24 | 25 | # RULES # 26 | 27 | #/ 28 | # Prints the runtime value of a `Makefile` variable. 29 | # 30 | # ## Notes 31 | # 32 | # - The rule uses the following format: 33 | # 34 | # ```bash 35 | # $ make inspect. 36 | # ``` 37 | # 38 | # @example 39 | # make inspect.ROOT_DIR 40 | #/ 41 | inspect.%: 42 | $(QUIET) echo '$*=$($*)' 43 | 44 | #/ 45 | # Asserts that a `Makefile` variable is set. 46 | # 47 | # ## Notes 48 | # 49 | # - The rule uses the following format: 50 | # 51 | # ```bash 52 | # $ make assert. 53 | # ``` 54 | # 55 | # - If a variable is **not** set, the recipe exits with a non-zero exit code. 56 | # 57 | # @example 58 | # make assert.ROOT_DIR 59 | #/ 60 | assert.%: 61 | $(QUIET) if [[ "${${*}}" = "" ]]; then \ 62 | echo "\nError: You must set the environment variable: ${*}.\n"; \ 63 | exit 1; \ 64 | fi 65 | -------------------------------------------------------------------------------- /tools/make/help.mk: -------------------------------------------------------------------------------- 1 | #/ 2 | # @license MIT 3 | # 4 | # Copyright (c) 2020 Python Data APIs Consortium. 5 | # 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy 7 | # of this software and associated documentation files (the "Software"), to deal 8 | # in the Software without restriction, including without limitation the rights 9 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | # copies of the Software, and to permit persons to whom the Software is 11 | # furnished to do so, subject to the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included in all 14 | # copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | # SOFTWARE. 23 | #/ 24 | 25 | # VARIABLES # 26 | 27 | # Define the path to the Makefile usage text file for displaying help information: 28 | MAKE_USAGE ?= $(TOOLS_MAKE_DIR)/usage.txt 29 | 30 | 31 | # RULES # 32 | 33 | #/ 34 | # Prints a `Makefile` help message which includes a list of common commands. 35 | # 36 | # @example 37 | # make help 38 | #/ 39 | help: 40 | $(QUIET) $(CAT) $(MAKE_USAGE) 41 | 42 | .PHONY: help 43 | -------------------------------------------------------------------------------- /tools/make/lib/node.mk: -------------------------------------------------------------------------------- 1 | #/ 2 | # @license MIT 3 | # 4 | # Copyright (c) 2020 Python Data APIs Consortium. 5 | # 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy 7 | # of this software and associated documentation files (the "Software"), to deal 8 | # in the Software without restriction, including without limitation the rights 9 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | # copies of the Software, and to permit persons to whom the Software is 11 | # furnished to do so, subject to the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included in all 14 | # copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | # SOFTWARE. 23 | #/ 24 | 25 | # RULES # 26 | 27 | #/ 28 | # Install node module dependencies. 29 | # 30 | # @example 31 | # make install-node 32 | #/ 33 | install-node: 34 | $(QUIET) $(NPM) install 35 | 36 | .PHONY: install-node 37 | 38 | #/ 39 | # Removes node module dependencies. 40 | # 41 | # @example 42 | # make clean-node 43 | clean-node: 44 | $(QUIET) $(DELETE) $(DELETE_FLAGS) $(NODE_MODULES) 45 | 46 | .PHONY: clean-node 47 | -------------------------------------------------------------------------------- /tools/make/usage.txt: -------------------------------------------------------------------------------- 1 | 2 | Usage: make 3 | 4 | make help Print this message. 5 | 6 | make view-docs View all array API tables. 7 | 8 | make view-join View cross-library array API data. 9 | 10 | make view-intersection View the intersection of array library 11 | APIs. 12 | 13 | make view-intersection-ranks View a table ranking the intersection 14 | of array library APIs. 15 | 16 | make view-common-apis View relatively common array library 17 | APIs. 18 | 19 | make view-common-apis-ranks View a table ranking relatively common 20 | array library APIs. 21 | 22 | make view-complement View array library APIs which are not 23 | in the intersection. 24 | 25 | make view-common-complement View array library APIs which are not 26 | among the list of relatively common 27 | APIs. 28 | 29 | make view-lib-top-k-common View a table displaying the top `K` 30 | (relatively) common array library APIs 31 | across various libraries. 32 | 33 | make view-lib-top-k-complement View a table displaying the top K array 34 | library APIs in the complement across 35 | various libraries. 36 | 37 | make view-lib-top-k-common-complement View a table displaying the top `K` 38 | array library APIs in the complement of 39 | the list of (relatively) common APIs 40 | across various libraries. 41 | 42 | --------------------------------------------------------------------------------