Skip to content

Commit

Permalink
Adding (ivy-llc#10585)
Browse files Browse the repository at this point in the history
Co-authored-by: MahmoudAshraf97 <[email protected]>
  • Loading branch information
soma2000-lang and MahmoudAshraf97 authored Feb 16, 2023
1 parent c1669e1 commit 0704634
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
9 changes: 6 additions & 3 deletions ivy/array/experimental/statistical.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,12 @@ def nanmedian(
overwrite_input
If True, then allow use of memory of input array a for calculations.
The input array will be modified by the call to median. This will
save memory when you do not need to preserve the contents of the input array.
Treat the input as undefined, but it will probably be fully or partially sorted.
Default is False. If overwrite_input is True and a is not already an ndarray,
save memory when you do not need to
preserve the contents of the input array.
Treat the input as undefined, but it will
probably be fully or partially sorted.
Default is False. If overwrite_input
is True and a is not already an ndarray,
an error will be raised.
out
optional output array, for writing the result to.
Expand Down
14 changes: 8 additions & 6 deletions ivy/container/experimental/statistical.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,10 +551,10 @@ def quantile(
>>> b = a.quantile(q, axis = 0, interpolation="lower")
>>> print(b)
{
x: ivy.array([[3., 2., 1.],
x: ivy.array([[3., 2., 1.],
[3., 2., 1.]]),
y: ivy.array([1., 3.])
}
}
"""
return self.static_quantile(
self,
Expand Down Expand Up @@ -756,10 +756,12 @@ def nanmedian(
keepdims any exceptions will be raised.
overwrite_input
If True, then allow use of memory of input array a for calculations.
The input array will be modified by the call to median. This will
save memory when you do not need to preserve the contents of the input array.
Treat the input as undefined, but it will probably be fully or partially sorted.
Default is False. If overwrite_input is True and a is not already an ndarray,
The input array will be modified by the call to median.
This will save memory when you do not need to preserve
the contents of the input array.Treat the input as undefined,
but it will probably be fully or partially sorted.
Default is False. If overwrite_input is True and
a is not already an ndarray,
an error will be raised.
out
optional output array, for writing the result to.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs
from ivy.functional.frontends.numpy.linalg.norms_and_other_numbers import matrix_rank


# solve
@with_unsupported_dtypes({"1.23.0 and below": ("float16",)}, "numpy")
@to_ivy_arrays_and_back
Expand Down
2 changes: 1 addition & 1 deletion ivy/inspection.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def fn_array_spec(fn):
"""
try: # this is because it raises error if python version 3.8.0, in certain cases
type_hints = get_type_hints(fn)
except Exception as e:
except Exception:
type_hints = dict()
array_idxs = list()
for i, (k, v) in enumerate(type_hints.items()):
Expand Down

0 comments on commit 0704634

Please sign in to comment.