yes, the individual test score values are results of AbsoluteTiming. It's interesting to see the variation between platforms. My fairly new MacBook Pro M1 is mostly faster than my ancient Windows Kaby Lake system, but, for example, sorting reals is almost twice as slow on the M1.
Hello everyone. I have been googling, but I can't even find the appropriate words to get borderline relevant results. I wonder whether there is a function in Mathematica that I can use to distinguish between 1D, 2D, 3D and so on lists. The lists can be irregular, which makes DImensions not suitable for the task
by irregular I mean something like {{a, b, c}, {e, d, f, g, t}, {t}}, for which Dimensions just returns 3, which would be the same result as for {a,b,c}
Mostly, a way to illustrate that point is to note that both Depth[{{a, b, c}, {e, d, f, g, t}, {t}}] and Depth[{{a, b, c}, f[e, d, f, g, t], {t}}] give 3. You may or may not want that, depending on what you're doing.
(It's unfortunate Depth[] doesn't have an AllowedHeads option like ArrayDepth[].)
in your example with f[e,d,f,g,t] in it, isn't the answer dictated by the presence of the sublists? That is, unless f[...] was a 2D list itself, the anwer won't change?
So I see that Depth[{a<b}] gives 3, but Depth[{a<b/c}] gives 5. This is very undesirable for me. Can that be avoided?
I was thinking of writing a question, but I don't even know where to start from, since I discovered that also inequalities are counted different than expressions without inequalities in them, so it is a bit of a mess and I don't know how to come up with a minimumal working example that encompasses all the issues I have.
I also have Indexed expressiosn which seem to be coutned differently, so at this stage I have no clue what other objects Mathematica counts differently, so I don't think I can use Depth with confidence