This is a possible solution to #105 without changing the data type for all subtypes of np.unsignedinteger.
import nifty.graph.rag as nrag
import numpy as np
This is an example:
dtypes = [np.uint8, np.uint16, np.uint32, np.uint64, np.int8, np.float32]
for dt in dtypes:
a = np.zeros((1, 1, 1), dtype=dt)
rag = nrag.gridRag( a )
print( rag, type( rag ) )
This is just an idea of how gridRag could be relaxed to accept more types/all unsigned integer types. If you have any concerns about how I implemented this, let me know.
This is a possible solution to #105 without changing the data type for all subtypes of
np.unsignedinteger
.Output:
This is just an idea of how
gridRag
could be relaxed to accept more types/all unsigned integer types. If you have any concerns about how I implemented this, let me know.