[Python-ideas] Python multi-dimensional array constructor

Mikhail V mikhailwas at gmail.com
Wed Oct 19 16:35:08 EDT 2016


On 19 October 2016 at 21:08, Todd <toddrjen at gmail.com> wrote:

>
> a = np.ndarray([[[[48, 11, 141, 13, -60, -37, 58, -52, -29, 134],
>                   [-6, 96, -66, 137, -59, -147, -118, -104, -123, -7]],
>                  [[-103, 50, -89, -12,  28, -12, 119, -131, -73, 21],
>                   [-58, 105, 25, -138, -106, -118, -29, -49, -63, -56]]],
>                 [[[-43, -34, 101, -115, 41, 121, 3, -117, 101, -145],
>                   [100, -128, 76, 128, -113, -90, 52, -91, -72, -15]],
>                  [[22, -65, -118, 134, -58, 55, -73, -118, -53, -60],
>                   [-85, -136, 83, -66, -35, -117, -71, 115, -56, 133]]]])
>
> I think both of the new examples are considerably clearer than the current
> approach.
>
> Does anyone have any questions or thoughts?

My 5 cents here. When I am dealing with such arrays,
the only *good* solution which comes to my mind
is to find or develop a nice GUI application
which will allow me to use all powers of
mouse/keyboard for navigation through data and switching
between dimensions, and editing them in an
effective way.
Anything in a text mode editor for this task will
be probably pointless, both for editing and reading
such arrays. And indeed it is frustrating  and
error prone at times.

Mikhail


More information about the Python-ideas mailing list