larray.Session.add¶
-
Session.
add
(self, *args, **kwargs)[source]¶ Adds objects to the current session.
- Parameters
- *argslist of object
Objects to add. Objects must have an attribute ‘name’.
- **kwargsdict of {str: object}
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']