Skip to content

Commit

Permalink
Fix for ones.
Browse files Browse the repository at this point in the history
  • Loading branch information
aschaffer committed Feb 20, 2024
1 parent 5096978 commit 6b01e50
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions cunumeric/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -8332,8 +8332,6 @@ def nanquantile_impl(

assert non_nan_counts.shape == remaining_shape

arr_ones = ones(remaining_shape, dtype=arr.dtype)

arr_gammas = zeros(remaining_shape, dtype=arr.dtype)
arr_lvals = zeros(remaining_shape, dtype=arr.dtype)
arr_rvals = zeros(remaining_shape, dtype=arr.dtype)
Expand Down Expand Up @@ -8369,17 +8367,15 @@ def nanquantile_impl(
#
if len(qindex) == 0:
left = (
arr_ones.reshape(qs_all.shape)
- arr_gammas.reshape(qs_all.shape)
1 - arr_gammas.reshape(qs_all.shape)
) * arr_lvals.reshape(qs_all.shape)
right = arr_gammas.reshape(qs_all.shape) * arr_rvals.reshape(
qs_all.shape
)
qs_all[...] = left + right
else:
left = (
arr_ones.reshape(qs_all[qindex].shape)
- arr_gammas.reshape(qs_all[qindex].shape)
1 - arr_gammas.reshape(qs_all[qindex].shape)
) * arr_lvals.reshape(qs_all[qindex].shape)
right = arr_gammas.reshape(
qs_all[qindex].shape
Expand Down

0 comments on commit 6b01e50

Please sign in to comment.