larray.Session.add

Session.add(*args, **kwargs)[source]

Adds objects to the current session.

Parameters:

args : array

List of objects to add. Objects must have an attribute ‘name’.

kwargs : dict of str, array

List of objects to add written as ‘name’=array, …

Examples

>>> s = Session()
>>> axis1, axis2 = Axis('x=x0..x2'), Axis('y=y0..y2')
>>> arr1, arr2, arr3 = ndtest((2, 2)), ndtest(4), ndtest((3, 2))
>>> s.add(axis1, axis2, arr1=arr1, arr2=arr2, arr3=arr3)
>>> # print item's names in sorted order
>>> s.names
['arr1', 'arr2', 'arr3', 'x', 'y']