If memory and speed are not concerns, is there a reason to use QuantityArray instead of an array of quantities?
$\begingroup$ $\endgroup$
2 - 1$\begingroup$ @DanielHuber, it is possible to have something like QuantityArray[RandomInteger[10, {1000, 2}], {"Meters", "Seconds"}], where units are different at the deepest level. This actually works for the n deepest levels. The simplest case is indeed when n = 0, with all entries having the same unit. $\endgroup$jose– jose2024-02-18 19:45:12 +00:00Commented Feb 18, 2024 at 19:45
- $\begingroup$ @jose You are right, I was mistaken. Thanks for the hint. I deleted my note. $\endgroup$Daniel Huber– Daniel Huber2024-02-18 19:50:39 +00:00Commented Feb 18, 2024 at 19:50
Add a comment |
1 Answer
$\begingroup$ $\endgroup$
2 I think speed and memory are the primary reasons for using a QuantityArray.
Another benefit is the formatting, a summary box is a more compact visual representation. At a glance you can see the dimensions of the array, the units, and with one click you can see the min and max values.
- 2$\begingroup$ The compact summary box is indeed quite useful. Clicking the Plus sign gives you bounds information, for example. $\endgroup$jose– jose2024-02-18 19:48:43 +00:00Commented Feb 18, 2024 at 19:48
- $\begingroup$ Thanks Jose - I updated the response. $\endgroup$Jason B.– Jason B.2024-02-19 16:33:18 +00:00Commented Feb 19, 2024 at 16:33