Skip to content

Commit ad8b184

Browse files
committed
Replaced double with float64
1 parent 3b9c7c4 commit ad8b184

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pandas/_libs/groupby.pyx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ def group_quantile(ndarray[float64_t] out,
386386
ndarray[int64_t] labels,
387387
numeric[:] values,
388388
ndarray[uint8_t] mask,
389-
double_t q,
389+
float64_t q,
390390
object interpolation):
391391
"""
392392
Calculate the quantile per group.
@@ -399,7 +399,7 @@ def group_quantile(ndarray[float64_t] out,
399399
Array containing the unique group labels.
400400
values : ndarray
401401
Array containing the values to apply the function against.
402-
q : double
402+
q : float
403403
The quantile value to search for.
404404
405405
Notes
@@ -412,7 +412,7 @@ def group_quantile(ndarray[float64_t] out,
412412
int64_t lab, ngroups, grp_sz, non_na_sz, grp_start=0, idx=0
413413
uint8_t interp, offset
414414
numeric val, next_val
415-
double_t q_idx, frac
415+
float64_t q_idx, frac
416416
ndarray[int64_t] counts, non_na_counts
417417
ndarray[int64_t] sort_arr
418418

@@ -450,7 +450,7 @@ def group_quantile(ndarray[float64_t] out,
450450

451451
# Calculate where to retrieve the desired value
452452
# Casting to int will intentionaly truncate result
453-
idx = grp_start + <int64_t>(q * <double_t>(non_na_sz - 1))
453+
idx = grp_start + <int64_t>(q * <float64_t>(non_na_sz - 1))
454454

455455
val = values[sort_arr[idx]]
456456
# If requested quantile falls evenly on a particular index

0 commit comments

Comments
 (0)