In [12]:
from IPython.display import display_pretty

Array creation

  • convert python array-like objects
  • intrinsic Numpy Array creation
  • reading array from disk

In [13]:
import numpy as np
a = np.zeros((2, 3))
b = np.arange(1, 10, 0.5)
c = np.linspace(0, 10, 20)
d = np.array([1, 2.0, 1 + 3j])
display_pretty(a, b, c, d)


array([[ 0.,  0.,  0.],
       [ 0.,  0.,  0.]])
array([ 1. ,  1.5,  2. ,  2.5,  3. ,  3.5,  4. ,  4.5,  5. ,  5.5,  6. ,
        6.5,  7. ,  7.5,  8. ,  8.5,  9. ,  9.5])
array([  0.        ,   0.52631579,   1.05263158,   1.57894737,
         2.10526316,   2.63157895,   3.15789474,   3.68421053,
         4.21052632,   4.73684211,   5.26315789,   5.78947368,
         6.31578947,   6.84210526,   7.36842105,   7.89473684,
         8.42105263,   8.94736842,   9.47368421,  10.        ])
array([ 1.+0.j,  2.+0.j,  1.+3.j])