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
Tried to run ttpy on WSL today, ran into the following issue when running this trivial code: tt.unit(2, 2)
TypeError Traceback (most recent call last)
<ipython-input-2-f256968648f6> in <module>
----> 1 tt.unit(2, 2)
~/.local/lib/python3.5/site-packages/tt/core/tools.py in unit(n, d, j, tt_instance)
788
789 for k in xrange(d):
--> 790 rv.append(_np.zeros((1, n[k], 1)))
791 rv[-1][0, j[k], 0] = 1
792 if tt_instance:
TypeError: 'numpy.float64' object cannot be interpreted as an integer
np.ones() returns an np.float64 array, which can not be used to specify shape.
I have fixed it for myself by using dtype=int in two place, namely the above function unit and twice in ind2sub, but I believe this will be in more places.
The text was updated successfully, but these errors were encountered:
Tried to run ttpy on WSL today, ran into the following issue when running this trivial code:
tt.unit(2, 2)
np.ones()
returns annp.float64
array, which can not be used to specify shape.I have fixed it for myself by using dtype=int in two place, namely the above function
unit
and twice inind2sub
, but I believe this will be in more places.The text was updated successfully, but these errors were encountered: