@@ -48,7 +48,7 @@ def group_add_{{name}}(ndarray[{{c_type}}, ndim=2] out,
48
48
nobs = np.zeros_like(out)
49
49
sumx = np.zeros_like(out)
50
50
51
- N, K = (<object> values).shape
51
+ N, K = (<object>values).shape
52
52
53
53
with nogil:
54
54
@@ -95,7 +95,7 @@ def group_prod_{{name}}(ndarray[{{c_type}}, ndim=2] out,
95
95
nobs = np.zeros_like(out)
96
96
prodx = np.ones_like(out)
97
97
98
- N, K = (<object> values).shape
98
+ N, K = (<object>values).shape
99
99
100
100
with nogil:
101
101
for i in range(N):
@@ -141,7 +141,7 @@ def group_var_{{name}}(ndarray[{{c_type}}, ndim=2] out,
141
141
nobs = np.zeros_like(out)
142
142
mean = np.zeros_like(out)
143
143
144
- N, K = (<object> values).shape
144
+ N, K = (<object>values).shape
145
145
146
146
out[:, :] = 0.0
147
147
@@ -193,7 +193,7 @@ def group_mean_{{name}}(ndarray[{{c_type}}, ndim=2] out,
193
193
nobs = np.zeros_like(out)
194
194
sumx = np.zeros_like(out)
195
195
196
- N, K = (<object> values).shape
196
+ N, K = (<object>values).shape
197
197
198
198
with nogil:
199
199
for i in range(N):
@@ -238,7 +238,7 @@ def group_ohlc_{{name}}(ndarray[{{c_type}}, ndim=2] out,
238
238
if len(labels) == 0:
239
239
return
240
240
241
- N, K = (<object> values).shape
241
+ N, K = (<object>values).shape
242
242
243
243
if out.shape[1] != 4:
244
244
raise ValueError('Output array must have 4 columns')
@@ -312,14 +312,14 @@ def group_last_{{name}}(ndarray[{{c_type}}, ndim=2] out,
312
312
if not len(values) == len(labels):
313
313
raise AssertionError("len(index) != len(labels)")
314
314
315
- nobs = np.zeros((<object> out).shape, dtype=np.int64)
315
+ nobs = np.zeros((<object>out).shape, dtype=np.int64)
316
316
{{if name == 'object'}}
317
- resx = np.empty((<object> out).shape, dtype=object)
317
+ resx = np.empty((<object>out).shape, dtype=object)
318
318
{{else}}
319
319
resx = np.empty_like(out)
320
320
{{endif}}
321
321
322
- N, K = (<object> values).shape
322
+ N, K = (<object>values).shape
323
323
324
324
{{if name == "object"}}
325
325
if True: # make templating happy
@@ -369,14 +369,14 @@ def group_nth_{{name}}(ndarray[{{c_type}}, ndim=2] out,
369
369
if not len(values) == len(labels):
370
370
raise AssertionError("len(index) != len(labels)")
371
371
372
- nobs = np.zeros((<object> out).shape, dtype=np.int64)
372
+ nobs = np.zeros((<object>out).shape, dtype=np.int64)
373
373
{{if name=='object'}}
374
- resx = np.empty((<object> out).shape, dtype=object)
374
+ resx = np.empty((<object>out).shape, dtype=object)
375
375
{{else}}
376
376
resx = np.empty_like(out)
377
377
{{endif}}
378
378
379
- N, K = (<object> values).shape
379
+ N, K = (<object>values).shape
380
380
381
381
{{if name == "object"}}
382
382
if True: # make templating happy
@@ -462,7 +462,7 @@ def group_rank_{{name}}(ndarray[float64_t, ndim=2] out,
462
462
463
463
tiebreak = tiebreakers[ties_method]
464
464
keep_na = na_option == 'keep'
465
- N, K = (<object> values).shape
465
+ N, K = (<object>values).shape
466
466
grp_sizes = np.ones_like(out)
467
467
468
468
# Copy values into new array in order to fill missing data
@@ -635,7 +635,7 @@ def group_max(ndarray[groupby_t, ndim=2] out,
635
635
maxx.fill(-np.inf)
636
636
nan_val = NAN
637
637
638
- N, K = (<object> values).shape
638
+ N, K = (<object>values).shape
639
639
640
640
with nogil:
641
641
for i in range(N):
@@ -697,7 +697,7 @@ def group_min(ndarray[groupby_t, ndim=2] out,
697
697
minx.fill(np.inf)
698
698
nan_val = NAN
699
699
700
- N, K = (<object> values).shape
700
+ N, K = (<object>values).shape
701
701
702
702
with nogil:
703
703
for i in range(N):
@@ -744,7 +744,7 @@ def group_cummin(ndarray[groupby_t, ndim=2] out,
744
744
ndarray[groupby_t, ndim=2] accum
745
745
int64_t lab
746
746
747
- N, K = (<object> values).shape
747
+ N, K = (<object>values).shape
748
748
accum = np.empty_like(values)
749
749
if groupby_t is int64_t:
750
750
accum.fill(_int64_max)
@@ -792,7 +792,7 @@ def group_cummax(ndarray[groupby_t, ndim=2] out,
792
792
ndarray[groupby_t, ndim=2] accum
793
793
int64_t lab
794
794
795
- N, K = (<object> values).shape
795
+ N, K = (<object>values).shape
796
796
accum = np.empty_like(values)
797
797
if groupby_t is int64_t:
798
798
accum.fill(-_int64_max)
0 commit comments