Open brechtvb opened 2 years ago
@brechtvb , Yeah I don't think H5 data type has native complex type. It will have to be split into 2 fields.
Indeed, there is no other way.
An ugly hack could be provided through issue #236:
unsafe public void Write(Guid guid, ReadOnlySpan<double> valuePath, ReadOnlySpan<Complex> cdata, string groupName)
{
var groupId = h5.Hdf5.CreateGroupRecursively(hfile, loc(guid, valuePath));
fixed (Complex* cptr = cdata)
{
double* dptr = (double*)cptr;
var ddata = new ReadOnlySpan<double>(dptr, cdata.Length * 2);
var ds = h5.Hdf5.WriteDatasetFromArray<double>(groupId, groupName, ddata.ToArray());
}
}
Is it possible to support System.Numerics.Complex
Today that has to be done through a
[float float]
compound, correct?