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
The unit test that checks whether ht.randn throws a ValueError depends on the fact that pytorch
shall detect malformed input. Unfortunately, this is not the case for my pytorch installation (trying to print the resulting tensor, however, results in an infinite loop, such that we can be sure that pytorch does not magically know how to handle negative dimensions ... )
For completeness the pytest output:
with self.assertRaises(ValueError):
> ht.randn(-1, 3, dtype=ht.float64)
E AssertionError: ValueError not raised
heat/core/tests/test_tensor.py:278: AssertionError
There seems to be already some all_ints variable available in ht.randn, which could be augmented to also check for positive arguments?
The text was updated successfully, but these errors were encountered:
So far ht.randn leaves the input checking mostly to pytorch.
This patch modifies ht.randn to at least check some of the
argument properties itself.
Fixes#58
The unit test that checks whether
ht.randn
throws aValueError
depends on the fact that pytorchshall detect malformed input. Unfortunately, this is not the case for my pytorch installation (trying to print the resulting tensor, however, results in an infinite loop, such that we can be sure that pytorch does not magically know how to handle negative dimensions ... )
For completeness the pytest output:
There seems to be already some
all_ints
variable available inht.randn
, which could be augmented to also check for positive arguments?The text was updated successfully, but these errors were encountered: