[go: nahoru, domu]

Skip to content

Commit

Permalink
Merge pull request #591 from mduschenes/float128-complex256-vspaces-b…
Browse files Browse the repository at this point in the history
…oxes-issue-590

added float128, complex256 dtypes to numpy vspaces and boxes for #590
  • Loading branch information
j-towns committed Apr 20, 2023
2 parents 81b288e + efecc64 commit 23fcdb0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions autograd/numpy/numpy_boxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ def __abs__(self): return anp.abs(self)
def __hash__(self): return id(self)

ArrayBox.register(np.ndarray)
for type_ in [float, np.float64, np.float32, np.float16,
complex, np.complex64, np.complex128]:
for type_ in [float, np.float128, np.float64, np.float32, np.float16,
complex, np.complex64, np.complex128, np.complex256]:
ArrayBox.register(type_)

# These numpy.ndarray methods are just refs to an equivalent numpy function
Expand Down
4 changes: 2 additions & 2 deletions autograd/numpy/numpy_vspaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def _covector(self, x):
if np.iscomplexobj(x)
else ArrayVSpace(x))

for type_ in [float, np.float64, np.float32, np.float16]:
for type_ in [float, np.float128, np.float64, np.float32, np.float16]:
ArrayVSpace.register(type_)

for type_ in [complex, np.complex64, np.complex128]:
for type_ in [complex, np.complex64, np.complex128, np.complex256]:
ComplexArrayVSpace.register(type_)

0 comments on commit 23fcdb0

Please sign in to comment.