HTM Core Numpy array to SDR

I have been trying to create a new encoder for visual data, to this end I have a 784 bit NumPy array already encoded to sparse state with a fill rate of 3%. Where I am getting stuck is how to convert this NumPy array to HTM Core SDR, since the NumPy array is already in a sparse state I do not need an encoder.

1 Like

You might want to try sdr.setDense

sdr = SDR()
sdr.setDense(numpy_array)
1 Like

Thanks I am using SDR(784).dense = x which woking well, i shall try your code as well.

1 Like