onnx_chainer.testing.input_generator.nonzero_increasing¶
- onnx_chainer.testing.input_generator.nonzero_increasing(*shape, dtype=<class 'numpy.float32'>, bias=1e-07)¶
Returns a monotonically increasing ndarray for test inputs.
Similar to increasing but contains no zeros. Expected to be used for divisors.
Example:
>>> onnx_chainer.testing.input_generator.nonzero_increasing(3, 4) array([[-3.0000000e+00, -2.5000000e+00, -1.9999999e+00, -1.4999999e+00], [-9.9999988e-01, -4.9999991e-01, 1.0000000e-07, 5.0000012e-01], [ 1.0000001e+00, 1.5000001e+00, 2.0000000e+00, 2.5000000e+00]], dtype=float32)
- Parameters
shape (tuple of int) – The shape of the output array.
dtype (numpy.dtype) – The dtype of the output array.
bias (float) – The bias to avoid zero.
- Returns
numpy.ndarray