Shrink jit.matrix based on cell contents?
Hey,
I'm looking for a way to shrink a jitter matrix based on cell contents. I have a very large matrix right now and I wold like to remove any cell that is equal to "0 0". That means that the matrix would go from being larger than 100 x 100 to a variable size that is based on the number of cells that contain a value. I'm obviously not interesting in maintaining cell position, but I'm only interested in a list of the data contained in the cells.
Thanks for your help!
On second thought, I just found the jit.spill object, which can only print out a pretty small list. Is there a way to restrict the matrix data before jit.spill so that jit.spill will only receive and output cells with a value != 0 ?
This may work for you.
If you want to get around the list length issue, you can use jit.iter
Awesome! Great call on 'jit.iter', totally missed that. Thanks for the examples, this is exactly what I was looking for.