Skip to main content

Questions tagged [packed-arrays]

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 usage.

4 votes
1 answer
108 views

I (only) recently started using PackedArrays. I discovered that RandomReal returns a PackedArray without having to use ...
eddy ardonne's user avatar
6 votes
2 answers
380 views

Consider this example: ...
Anton's user avatar
  • 2,072
12 votes
2 answers
285 views

The fabricated example below demonstrates a bizarre case I ran into. (If it matters, this is with Mma 14.1 on Apple ARM, but I see the same behavior with Mma 12.3.1 on Intel x86.) On a whim, I tried ...
Alexander Perlis's user avatar
3 votes
1 answer
138 views

Why are packed arrays limited to only a few types? Particularly, why are integer packed arrays limited to signed integers? And is there a way to get the same efficiency you get with packed arrays in ...
OneDeuxTriSeiGo's user avatar
4 votes
1 answer
121 views

I need to repeatedly increment cuboidal chunks of a 3D image. The image is large - on the order of 1G elements. The only way I know of doing it using built-in Image functions is: ...
Kuba hasn't forgotten Monica's user avatar
0 votes
3 answers
183 views

I have this code it runs and gives me the solution. How can I make it more compact and If I want it to extend(generalize) it to more variables how can I do it. I had asked a similar question here (...
Learner's user avatar
  • 259
13 votes
1 answer
402 views

Cross post here I have a compile function cf to calculate the mean for a ragged list: ...
yode's user avatar
  • 27.8k
0 votes
0 answers
72 views

In Mathematica, there is a concept called packed array. ...
imida k's user avatar
  • 4,435
2 votes
1 answer
120 views

I'm working with a ragged matrix of considerable size (ByteCount = 47749114088; Length = 563529128). I had seen a suggestion mentioned in other questions (here on StackExchange), that one might be ...
Todd Allen's user avatar
  • 2,274
3 votes
0 answers
123 views

I would expect the following code to produce a packed 11x11x11 element array of 64 bit integers, but it doesn't: ...
Bruce Bartlett's user avatar
6 votes
1 answer
145 views

I'm confused as to why the following leads to unpacking of a PackedArray: ...
TimRias's user avatar
  • 3,321
5 votes
1 answer
99 views

I am not looking for a solution or work-around, but an explanation. Here are six examples of doing a trivial operation on an association and a list. Initially, I was curious about the cost of calling ...
Craig Carter's user avatar
  • 7,544
1 vote
0 answers
130 views

Suppose, I have a nonlinear map, like this: ...
macros's user avatar
  • 99
5 votes
2 answers
239 views

Define a = RandomReal[1., {2, 100, 100, 100}]; then Total[a, Infinity]; // RepeatedTiming {0.00183727, Null} and ...
matheorem's user avatar
  • 17.7k
2 votes
1 answer
90 views

Consider the following; Pack some integers. In[287]:= Clear[p5i, p5ic, p5icu, p5r, p5rc, p5rcu] In[288]:= p5i = ToPackedArray@Range@5 Out[288]= {1, 2, 3, 4, 5} ...
RobertNathaniel's user avatar

15 30 50 per page
1
2 3 4 5 6