Untitled



In [ ]:
%matplotlib inline
from matplotlib import pyplot as plt
import seaborn as sns

In [4]:
import antipackage
from github.ellisonbg.misc import vizarray as va

In [5]:
import numpy as np

In [15]:
data = [0.0,2,4,6,10,12,100]
a = np.array(data)

In [16]:
type(a)


Out[16]:
numpy.ndarray

In [17]:
a


Out[17]:
array([   0.,    2.,    4.,    6.,   10.,   12.,  100.])

In [18]:
va.vizarray(a)


Out[18]:

In [19]:
a.shape


Out[19]:
(7,)

In [20]:
a.ndim


Out[20]:
1

In [21]:
a.size


Out[21]:
7

In [22]:
a.nbytes


Out[22]:
56

In [23]:
a.dtype


Out[23]:
dtype('float64')

In [36]:
data = [5,5,5,5,2,2,2,2,2,2,2],[5,5,5,5,0,0,0,0,0,0,0],[5,5,5,5,2,2,2,2,2,2,2],[5,5,5,5,0,0,0,0,0,0,0],[2,2,2,2,2,2,2,2,2,2,2],[0,0,0,0,0,0,0,0,0,0,0],[2,2,2,2,2,2,2,2,2,2,2],[0,0,0,0,0,0,0,0,0,0,0]
b = np.array(data)

In [37]:
b


Out[37]:
array([[5, 5, 5, 5, 2, 2, 2, 2, 2, 2, 2],
       [5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0],
       [5, 5, 5, 5, 2, 2, 2, 2, 2, 2, 2],
       [5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0],
       [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],
       [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
       [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],
       [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]])

In [38]:
va.vizarray(b)


Out[38]:

In [39]:
b.shape,b.ndim,b.size,b.nbytes


Out[39]:
((8, 11), 2, 88, 704)

In [ ]:
c = np.arange