On 19.10.2016 21:08, Todd wrote:

a= [|||| 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
     ||||]

b = [|||| 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 ||||]


Compared to the current approach:

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?

Honestly, all three look the same to me. Confusing, large, heavy. I'm sorry. :(

Best,
Sven
_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to