def map(self, func, axis=(<NUM_LIT:0>,)):
axes = sorted(tupleize(axis))<EOL>key_shape = [self.shape[axis] for axis in axes]<EOL>reshaped = self._align(axes, key_shape=key_shape)<EOL>mapped = asarray(list(map(func, reshaped)))<EOL>elem_shape = mapped[<NUM_LIT:0>].shape<EOL>linearized_shape_inv = key_shape + list(elem_shape)<EOL>reordered = mapped.reshape(*linearized_shape_inv)<EOL>return self._constructor(reordered)<EOL>
Apply a function across an axis.

Array will be aligned so that the desired set of axes
are in the keys, which may require a transpose/reshape.

Parameters
----------
func : function
    Function of a single array to apply

axis : tuple or int, optional, default=(0,)
    Axis or multiple axes to apply function along.

Returns
-------
BoltArrayLocal