Unsurprisingly, this overflows for large values in toString, and is also returning incorrect values in getDouble, getInt etc
@Test
public void testUint32(){
INDArray arr = Nd4j.create(DataType.UINT32, 10);
arr.assign(1024);
System.out.println(arr);
arr.assign(Integer.MAX_VALUE);
System.out.println(arr);
System.out.println(arr.getDouble(0));
System.out.println(arr.getInt(0));
}
[ 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024]
[ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]
-1.0
-1
These indexers would need to go in JavaCPP though
https://github.com/bytedeco/javacpp/tree/master/src/main/java/org/bytedeco/javacpp/indexer
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4