Getting error while retrieving elements from DoubleArray #364
coderAkshay
started this conversation in
General
Replies: 2 comments
-
|
Hi, Reading array of values using CSharp is generally done using the SWIG dedicated arrays such as FloatArray tmp = new FloatArray((long)prop.getValuesCountOfPatch(0)); // Wrap an unmanaged array of the correct size
try
{
prop.getFloatValuesOfPatch(0, tmp.cast()); // Notice the cast!!!!
float item = tmp.getitem(index); // Accessing an item where index is in the correct range. Here it should be between 0 and prop.getValuesCountOfPatch(0)
}
finally
{
tmp.Dispose(); // Ensure to dispose the unmanaged arrays when we have finished to use it
}It exists dedicated SWIG arrays for all most famous simple (POD) datatypes |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
If you already use/know this approach but want to try another one such as using DoubleArray_getitem, the error you face generally comes from:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm upgrading FesAPI from version 2.0.0.0 to 2.9.0.1.


To inspect elements from a DoubleArray, I used Marshal.Copy(swigCPtr.Handle, values, 0, count).
However, when I am using getItem from DoubleArray, then I am getting a below exception
I am not sure what is wrong here. Can you please help me out.
Beta Was this translation helpful? Give feedback.
All reactions