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
I try to create an ndarray(whose size is 5, and dtype is float) in c++ interface as the return value, which will be passed to a python function as output.
I tried this ↓
and this ↓
But all the methods turns out that the python function output data only retains one digit after the decimal point,
which does not match the precision of float.
For example:
the return_data[0]=0.0025783
but the arr[0]=0.0
May I ask where did I make a mistake?
Anyone gets any ideas??
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I try to create an ndarray(whose size is 5, and dtype is float) in c++ interface as the return value, which will be passed to a python function as output.


I tried this ↓
and this ↓
But all the methods turns out that the python function output data only retains one digit after the decimal point,
which does not match the precision of float.
For example:
the return_data[0]=0.0025783
but the arr[0]=0.0
May I ask where did I make a mistake?
Anyone gets any ideas??
Beta Was this translation helpful? Give feedback.
All reactions