Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite toArray and toString to work for multidimensional arrays #173

Closed
mateogianolio opened this issue Aug 7, 2019 · 0 comments
Closed

Comments

@mateogianolio
Copy link
Owner

Currently toString only prints the data in one dimension.

See examples below for a good representation.

One dimension

>>> np.arange(12)
array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11])

Two dimensions

>>> np.arange(12).reshape(6, 2)
array([[ 0,  1],
       [ 2,  3],
       [ 4,  5],
       [ 6,  7],
       [ 8,  9],
       [10, 11]])

Three dimensions

>>> np.arange(12).reshape(3, 2, 2)
array([[[ 0,  1],
        [ 2,  3]],

       [[ 4,  5],
        [ 6,  7]],

       [[ 8,  9],
        [10, 11]]])
@mateogianolio mateogianolio changed the title Rewrite toString to work for multidimensional arrays Rewrite toArray and toString to work for multidimensional arrays Aug 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant