Dependencies#
Datashape#
The Datashape project is documented here.
Progressivis uses the following classes:
- class progressivis.datashape.DataShape#
Composite container for datashape elements.
Elements of a datashape like
Fixed(3),Var()orint32are on, on their own, valid datashapes. These elements are collected together into a compositeDataShapeto be complete.This class is not intended to be used directly. Instead, use the utility
dshapefunction to create datashapes from strings or datashape elements.Examples
>>> from datashape import Fixed, int32, DataShape, dshape
>>> DataShape(Fixed(5), int32) # Rare to DataShape directly dshape("5 * int32")
>>> dshape('5 * int32') # Instead use the dshape function dshape("5 * int32")
>>> dshape([Fixed(5), int32]) # It can even do construction from elements dshape("5 * int32")
See also
datashape.dshape- __init__(*parameters, **kwds)#
- subarray(leading)#
Returns a data shape object of the subarray with ‘leading’ dimensions removed.
>>> from datashape import dshape >>> dshape('1 * 2 * 3 * int32').subarray(1) dshape("2 * 3 * int32") >>> dshape('1 * 2 * 3 * int32').subarray(2) dshape("3 * int32")