forked from mindspore-Ecosystem/mindspore
fix numpy doc
This commit is contained in:
parent
91675add3e
commit
60434a3d48
|
@ -402,9 +402,10 @@ def arange(start, stop=None, step=None, dtype=None):
|
|||
Tensor with evenly spaced values.
|
||||
|
||||
Raises:
|
||||
TypeError(PyNative Mode) or RuntimeError(Graph Mode): If input arguments
|
||||
have types not specified above, or arguments are not given in the correct
|
||||
orders specified above.
|
||||
TypeError(PyNative Mode): If input arguments have types not specified above,
|
||||
or arguments are not given in the correct orders specified above.
|
||||
RuntimeError(Graph Mode): The inputs that lead to TypeError in Pynative Mode
|
||||
will lead to RuntimeError in Graph Mode.
|
||||
|
||||
Supported Platforms:
|
||||
``Ascend`` ``GPU`` ``CPU``
|
||||
|
|
|
@ -149,8 +149,8 @@ def rollaxis(x, axis, start=0):
|
|||
If :math:`start <= axis`, the axis is rolled back until it lies in this position (`start`).
|
||||
If :math:`start > axis`: the axis is rolled until it lies before this position (`start`).
|
||||
|
||||
If :math:`start < 0`, the start will be normalized as shown in the table.
|
||||
(Please refer to the source code.)
|
||||
If :math:`start < 0`, the start will be normalized as a non-negative number (more details
|
||||
can be seen in the source code.)
|
||||
|
||||
.. table
|
||||
+===========+=================+
|
||||
|
@ -665,13 +665,14 @@ def where(condition, x=None, y=None):
|
|||
Returns elements chosen from `x` or `y` depending on `condition`.
|
||||
|
||||
Note:
|
||||
As nonzero is not supported, neither `x` or `y` can be None.
|
||||
As nonzero is not supported, both `x` and `y` must be provided Tensor
|
||||
input.
|
||||
|
||||
Args:
|
||||
condition (Tensor): where True, yield `x`, otherwise yield `y`.
|
||||
x (Tensor): Values from which to choose.
|
||||
x (Tensor): Values from which to choose. Defaults to None.
|
||||
y (Tensor): Values from which to choose. `x`, `y` and `condition` need
|
||||
to be broadcastable to some shape.
|
||||
to be broadcastable to some shape. Defaults to None.
|
||||
|
||||
Returns:
|
||||
Tensor or scalar, with elements from `x` where `condition` is True, and
|
||||
|
@ -2015,7 +2016,7 @@ def select(condlist, choicelist, default=0):
|
|||
from which the output elements are taken. It has to be of the same length as
|
||||
`condlist`.
|
||||
default (scalar, optional): The element inserted in output when all conditions
|
||||
evaluate to `False`.
|
||||
evaluate to `False`. Defaults to 0.
|
||||
|
||||
Returns:
|
||||
Tensor, the output at position `m` is the `m-th` element of the array in
|
||||
|
|
|
@ -1719,8 +1719,8 @@ def fmod(x1, x2, dtype=None):
|
|||
not supported.
|
||||
|
||||
Args:
|
||||
x1 (Tensor)
|
||||
x2 (Tensor): input arrays.
|
||||
x1 (Tensor): the first input arrays.
|
||||
x2 (Tensor): the second input arrays.
|
||||
dtype (:class:`mindspore.dtype`, optional): defaults to None. Overrides the dtype of the
|
||||
output Tensor.
|
||||
|
||||
|
@ -3513,7 +3513,7 @@ def arcsin(x, dtype=None):
|
|||
output Tensor.
|
||||
|
||||
Returns:
|
||||
Tensor.
|
||||
Output Tensor.
|
||||
|
||||
Raises:
|
||||
TypeError: If the input is not a tensor.
|
||||
|
@ -4359,8 +4359,10 @@ def interp(x, xp, fp, left=None, right=None):
|
|||
x-coordinates of the data points, must be increasing.
|
||||
fp (Union[int, float, bool, list, tuple, Tensor]): 1-D sequence of floats, the
|
||||
y-coordinates of the data points, same length as `xp`.
|
||||
left (float, optional): Value to return for ``x < xp[0]``, default is ``fp[0]``.
|
||||
right (float, optional): Value to return for ``x > xp[-1]``, default is ``fp[-1]``.
|
||||
left (float, optional): Value to return for ``x < xp[0]``, default is ``fp[0]``
|
||||
once obtained.
|
||||
right (float, optional): Value to return for ``x > xp[-1]``, default is ``fp[-1]``
|
||||
once obtained.
|
||||
|
||||
Returns:
|
||||
Tensor, the interpolated values, same shape as `x`.
|
||||
|
@ -4670,10 +4672,9 @@ def histogram(a, bins=10, range=None, weights=None, density=False): # pylint: di
|
|||
the range are ignored. The first element of the range must be less than
|
||||
or equal to the second.
|
||||
weights (Union[int, float, bool, list, tuple, Tensor], optional): An array
|
||||
of weights, of the same shape as `a`. Each value in `a` only contributes
|
||||
its associated weight towards the bin count (instead of 1). If density
|
||||
is True, the weights are normalized, so that the integral of the density
|
||||
over the range remains 1.
|
||||
of weights, of the same shape as `a`. If density is True, the weights
|
||||
are normalized, so that the integral of the density over the range
|
||||
remains 1.
|
||||
density (boolean, optional): If False, the result will contain the number of
|
||||
samples in each bin. If True, the result is the value of the probability
|
||||
density function at the bin, normalized such that the integral over the
|
||||
|
@ -5319,7 +5320,7 @@ def unwrap(p, discont=3.141592653589793, axis=-1):
|
|||
Args:
|
||||
p (Union[int, float, bool, list, tuple, Tensor): Input array.
|
||||
discont (float, optional): Maximum discontinuity between values, default is pi.
|
||||
axis (int, optional): Axis along which unwrap will operate, default is the last axis.
|
||||
axis (int, optional): Axis along which unwrap will operate, default is -1.
|
||||
|
||||
Returns:
|
||||
Tensor.
|
||||
|
|
Loading…
Reference in New Issue