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
{{ message }}
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.
When changing the dtype of an SArray from float to int, nan get converted to very large number:
In [1]: importturicreateastcIn [2]: sa=tc.SArray([1.0,2.0,float('nan'),3.0])
In [3]: saOut[3]:
dtype: floatRows: 4
[1.0, 2.0, nan, 3.0]
In [4]: sa.astype(int)
Out[4]:
dtype: intRows: 4
[1, 2, -9223372036854775808, 3]
I'm not certain what the best behavior would be here; it seems nan is a floating point only representation. It would probably be best to turn the nan into None. Raising an exception is also probably reasonable.
The text was updated successfully, but these errors were encountered:
When changing the dtype of an SArray from float to int,
nan
get converted to very large number:I'm not certain what the best behavior would be here; it seems
nan
is a floating point only representation. It would probably be best to turn thenan
intoNone
. Raising an exception is also probably reasonable.The text was updated successfully, but these errors were encountered: