larray.ndtest¶
-
larray.ndtest(shape, start=0, label_start=0, title='', dtype=<class 'int'>)[source]¶ Returns test array with given shape.
Axes are named by single letters starting from ‘a’. Axes labels are constructed using a ‘{axis_name}{label_pos}’ pattern (e.g. ‘a0’). Values start from start increase by steps of 1.
Parameters: shape : int, tuple/list of int
Shape of the array to create. An int can be used directly for one dimensional arrays.
start : int or float, optional
Start value
label_start : int, optional
Label index for each axis is label_start + position. label_start defaults to 0.
title : str, optional
Title.
dtype : type or np.dtype, optional
Type of resulting array.
Returns: LArray
Examples
>>> ndtest(6) a a0 a1 a2 a3 a4 a5 0 1 2 3 4 5 >>> ndtest((2, 3)) a\b b0 b1 b2 a0 0 1 2 a1 3 4 5 >>> ndtest((2, 3), label_start=1) a\b b1 b2 b3 a1 0 1 2 a2 3 4 5