Skip to content

Printing an array should use the same formatting as str() #3

@tcstewar

Description

@tcstewar

If you do

A = array([[1, 2], [3, 4]])
print A

then you get

arrayObject(data=[1, 2, 3, 4], typecode=i, start=0, dimensions=[2,2], strides=[2,1])

It'd be nicer to give

[[1 2]
 [3 4]]

as an output instead. Right now, this can only be done by

print str(A)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions