Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/awkward/operations/ak_angle.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
@ak._connect.numpy.implements("angle")
@high_level_function()
def angle(val, deg=False, highlevel=True, behavior=None, attrs=None):
"""
"""Returns the counterclockwise angle of each complex element in radians or degrees.

Args:
val : array_like
Input array.
Expand All @@ -28,8 +29,9 @@ def angle(val, deg=False, highlevel=True, behavior=None, attrs=None):
attrs (None or dict): Custom attributes for the output array, if
high-level.

Returns the counterclockwise angle from the positive real axis on the complex
plane in the range ``(-pi, pi]``, with dtype as a float.
Returns:
The counterclockwise angle from the positive real axis on the complex
plane in the range ``(-pi, pi]``, with dtype as a float.
"""
# Dispatch
yield (val,)
Expand Down
9 changes: 6 additions & 3 deletions src/awkward/operations/ak_imag.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
@ak._connect.numpy.implements("imag")
@high_level_function()
def imag(val, highlevel=True, behavior=None, attrs=None):
"""
"""Returns the imaginary components of the given array elements.

If the arrays have complex elements, the returned arrays are floats.

Args:
val : array_like
Input array.
Expand All @@ -26,8 +29,8 @@ def imag(val, highlevel=True, behavior=None, attrs=None):
attrs (None or dict): Custom attributes for the output array, if
high-level.

Returns the imaginary components of the given array elements.
If the arrays have complex elements, the returned arrays are floats.
Returns:
The imaginary components of the given array elements.
"""
# Dispatch
yield (val,)
Expand Down
11 changes: 8 additions & 3 deletions src/awkward/operations/ak_isclose.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ def isclose(
behavior=None,
attrs=None,
):
"""
"""Returns a boolean array of element-wise approximate-equality between two arrays.

Implements [np.isclose](https://numpy.org/doc/stable/reference/generated/numpy.isclose.html)
for Awkward Arrays.

Args:
a: Array-like data (anything #ak.to_layout recognizes).
b: Array-like data (anything #ak.to_layout recognizes).
Expand All @@ -42,8 +46,9 @@ def isclose(
attrs (None or dict): Custom attributes for the output array, if
high-level.

Implements [np.isclose](https://numpy.org/doc/stable/reference/generated/numpy.isclose.html)
for Awkward Arrays.
Returns:
An array of booleans, True where `a` and `b` are approximately equal
within the given tolerances.
"""
# Dispatch
yield a, b
Expand Down
9 changes: 6 additions & 3 deletions src/awkward/operations/ak_real.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
@ak._connect.numpy.implements("real")
@high_level_function()
def real(array, highlevel=True, behavior=None, attrs=None):
"""
"""Returns the real components of the given array elements.

If the arrays have complex elements, the returned arrays are floats.

Args:
array : array_like
Input array.
Expand All @@ -26,8 +29,8 @@ def real(array, highlevel=True, behavior=None, attrs=None):
attrs (None or dict): Custom attributes for the output array, if
high-level.

Returns the real components of the given array elements.
If the arrays have complex elements, the returned arrays are floats.
Returns:
The real components of the given array elements.
"""
# Dispatch
yield (array,)
Expand Down
7 changes: 4 additions & 3 deletions src/awkward/operations/ak_round.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ def round(
behavior=None,
attrs=None,
):
"""
"""Rounds each array element to the given number of decimals.

Args:
array : array_like
Input array.
Expand All @@ -40,8 +41,8 @@ def round(
attrs (None or dict): Custom attributes for the output array, if
high-level.

Returns the real components of the given array elements.
If the arrays have complex elements, the returned arrays are floats.
Returns:
An array with each element rounded to the given number of `decimals`.
"""
# Dispatch
yield (array,)
Expand Down
Loading