You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
factories.array does not support 0-dim tensors if split is not None.
To Reproduce
Steps to reproduce the behavior:
Which module/class/function is affected?
factories.array / stride_tricks.sanitize_axis
What are the circumstances under which the bug appears?
create splitted heat array from scalar
What is the exact error-message/erroneous behaviour?
Traceback (most recent call last):
File "pt.py", line 4, in<module>
a = ht.array(1, split=0)
File "heat/core/factories.py", line 323, in array
split = sanitize_axis(obj.shape, split)
File "heat/core/stride_tricks.py", line 109, in sanitize_axis
raise ValueError("axis {} is out of bounds for shape {}".format(axis, shape))
ValueError: axis 0 is out of bounds for shape torch.Size([])
Traceback (most recent call last):
File "pt.py", line 4, in<module>
a = ht.array(1, split=0)
File "heat/core/factories.py", line 323, in array
split = sanitize_axis(obj.shape, split)
File "heat/core/stride_tricks.py", line 109, in sanitize_axis
raise ValueError("axis {} is out of bounds for shape {}".format(axis, shape))
ValueError: axis 0 is out of bounds for shape torch.Size([])
Description
factories.array does not support 0-dim tensors if split is not None.
To Reproduce
Steps to reproduce the behavior:
factories.array / stride_tricks.sanitize_axis
create splitted heat array from scalar
Expected behaviour
Create 0-dim heat tensor
Illustrative
Version Info
v0.3.0
Additional comments
This bug affects issue #490
The text was updated successfully, but these errors were encountered: