public unsafe void Wrap_Case2() { var mem = np.arange(100).astype(NPTypeCode.Double); var addr = (double *)mem.Address; var count = mem.size; var wrapped = ArraySlice.Wrap(addr, count); for (int i = 0; i < 100; i++) { wrapped[i].Should().Be(i); } }
public unsafe void Wrap_Case2() { var mem = np.arange(100).astype(NPTypeCode.Double); var addr = (double *)mem.Address; var count = mem.size; var wrapped = ArraySlice.Wrap(addr, count); for (int i = 0; i < 100; i++) { wrapped[i].Should().Be(i); } }