Skip to content

Commit

Permalink
Different approach for typechecking
Browse files Browse the repository at this point in the history
Signed-off-by: Vassily Litvinov <[email protected]>
  • Loading branch information
vasslitvinov committed Feb 12, 2025
1 parent 36a920c commit e196fc5
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions arkouda/numpy/_numeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -1965,13 +1965,11 @@ def histogram2d(
raise ValueError("bins must be 1 or greater")

if range:
(xMin, xMax), (yMin, yMax) = range
xMin, xMax = _convToDtp(x.dtype, xMin, xMax)
yMin, yMax = _convToDtp(y.dtype, yMin, yMax)
(xMin0, xMax0), (yMin0, yMax0) = range
xMin, xMax = _convToDtp(x.dtype, xMin0, xMax0)
yMin, yMax = _convToDtp(y.dtype, yMin0, yMax0)
else:
# applying _convToDtp solely for typechecking
xMin, xMax = _convToDtp(x.dtype, x.min(), x.max())
yMin, yMax = _convToDtp(y.dtype, y.min(), y.max())
xMin, xMax, yMin, yMax = x.min(), x.max(), y.min(), y.max()

x_bin_boundaries = linspace(xMin, xMax, x_bins + 1)
y_bin_boundaries = linspace(yMin, yMax, y_bins + 1)
Expand Down

0 comments on commit e196fc5

Please sign in to comment.