Greetings. I'm just picking J up again after a brief 10-year hiatus and I have a question about sparse arrays. I understand I can convert a dense array to a sparse array so:
sparse =. $. ? 1000000 # 3 NB. Gives me an array whose zeros are not taking up any room. Perfect. But what do I do if the dense array I'm trying to "sparse" is too big to exist as a dense array? For example: sparse =. $. = ? 100000000 # 1000 NB. Gives me an out of memory error. Now, the self-classify of this array is mostly zeros and, as a sparse array, it wouldn't take up much space. But I can't work out how to make it into a sparse array...as it's being created? Before it's created? Is there a way to bind the sparse verb to the self-classify verb such that = "pipes" directly into the sparse version of its result? Any insights into this would be greatly appreciated. Many thanks. Ed ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm