Skip to content

MAINT: add several missing aliases #88

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion torch_np/_detail/_binary_ufuncs.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@
not_equal,
)
from torch import pow as power
from torch import remainder, subtract
from torch import remainder
from torch import remainder as mod
from torch import subtract, true_divide

from . import _dtypes_impl, _util

Expand Down
2 changes: 2 additions & 0 deletions torch_np/_detail/_unary_ufuncs.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# renames
from torch import absolute as fabs
from torch import arccos, arccosh, arcsin, arcsinh, arctan, arctanh
from torch import bitwise_not
from torch import bitwise_not as invert
from torch import ceil
from torch import conj_physical as conjugate
Expand All @@ -31,6 +32,7 @@
from torch import rad2deg
from torch import rad2deg as degrees
from torch import reciprocal
from torch import round as fix
from torch import round as rint
from torch import sign, signbit, sin, sinh, sqrt, square, tan, tanh, trunc

Expand Down
3 changes: 3 additions & 0 deletions torch_np/_dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,10 @@ class bool_(generic):
"double": float64,
"float_": float64,
"csingle": complex64,
"singlecomplex": complex64,
"cdouble": complex128,
"cfloat": complex128,
"complex_": complex128,
}
for name, obj in _name_aliases.items():
globals()[name] = obj
Expand Down
1 change: 1 addition & 0 deletions torch_np/tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@

ufunc_names = _unary_ufuncs.__all__
ufunc_names.remove("invert") # torch: bitwise_not_cpu not implemented for 'Float'
ufunc_names.remove("bitwise_not")

one_arg_funcs += [getattr(_unary_ufuncs, name) for name in ufunc_names]

Expand Down