Tag for questions about packed arrays. Packed Arrays are data structures that can be seen as monolithic blocks containing a single data type, particularly Integers and Reals. Many functions operate very efficient on packed arrays. Questions may deal with packed array generation, conversion, and ...

learn more… | top users | synonyms

43
votes
2answers
2k views

What is a Mathematica packed array?

A simple sounding question with a few sub questions: What is the difference between unpacked vs packed array? Are packed arrays more space efficent, how much so? Are packed arrays more time ...
27
votes
3answers
612 views

Are there guidelines for avoiding the unpacking of a packed array?

Packed arrays are very useful because they save memory and generally allow speedier and more efficient calculation times. If a list of data currently stored as a packed array is unpacked, it can slow ...
19
votes
0answers
276 views

Why does list assignment with a packed array result in unpacked values?

This is another question on the design choices in Mathematica. I understand that without direct reply from the developers it may not be possible to give a definitive and exhaustive answer to "why" ...
10
votes
2answers
446 views

Speeding up construction of simple tridiagonal matrix

I have the following code to construct a tridiagonal matrix: ...
7
votes
4answers
296 views

Unexpected behavior from GatherBy in version 7

I have come across what appears to be a bug in GatherBy. It appears similar to the problem of using Table[Random[], {1000}] in ...
12
votes
2answers
182 views

How do you determine the optimal autocompilation length on your system

When you pack lists there is an overhead therefore packing a list with, say, 2 elements is likely to cost more than you get back in efficiency. Mathematica has default list lengths for which functions ...
4
votes
1answer
162 views

Isn't it possible to Pack a SparseArray?

I have the following matrix Va: ...
19
votes
2answers
670 views

Why does ImageData need four times more memory?

Background We are dealing with very large TIFF image files that are imported, processed and exported using Mathematica 9.0.1. Many of our algorithms only work with an array representation of the ...
14
votes
1answer
276 views

Unpacked eigenvectors of complex matrices

Edit: This bug is fixed in Mathematica 10.0.0 I want to calculate eigenvectors of a Hermitian matrix. For example ...
7
votes
4answers
214 views

Why does array packing in Table behave like this?

Consider the following example, which generate two identical arrays. Why sometimes the array is packed and sometimes it doesn't? And why they perform differently? Here the arrays are packed: ...
4
votes
1answer
98 views

Memory usage of timeseries - lists of {Integer32, Real32}

A list of {Integer32, Real32} items in Mathematica seems to use 12-times as much memory than the C equivalent array of structs. ...