@@ -294,9 +294,9 @@ def test_group_var_generic_1d(self):
294
294
prng = RandomState (1234 )
295
295
296
296
out = (np .nan * np .ones ((5 , 1 ))).astype (self .dtype )
297
- counts = np .zeros (5 , dtype = int )
297
+ counts = np .zeros (5 , dtype = 'int64' )
298
298
values = 10 * prng .rand (15 , 1 ).astype (self .dtype )
299
- labels = np .tile (np .arange (5 ), (3 , ))
299
+ labels = np .tile (np .arange (5 ), (3 , )). astype ( 'int64' )
300
300
301
301
expected_out = (np .squeeze (values )
302
302
.reshape ((5 , 3 ), order = 'F' )
@@ -311,9 +311,9 @@ def test_group_var_generic_1d_flat_labels(self):
311
311
prng = RandomState (1234 )
312
312
313
313
out = (np .nan * np .ones ((1 , 1 ))).astype (self .dtype )
314
- counts = np .zeros (1 , dtype = int )
314
+ counts = np .zeros (1 , dtype = 'int64' )
315
315
values = 10 * prng .rand (5 , 1 ).astype (self .dtype )
316
- labels = np .zeros (5 , dtype = int )
316
+ labels = np .zeros (5 , dtype = 'int64' )
317
317
318
318
expected_out = np .array ([[values .std (ddof = 1 ) ** 2 ]])
319
319
expected_counts = counts + 5
@@ -327,9 +327,9 @@ def test_group_var_generic_2d_all_finite(self):
327
327
prng = RandomState (1234 )
328
328
329
329
out = (np .nan * np .ones ((5 , 2 ))).astype (self .dtype )
330
- counts = np .zeros (5 , dtype = int )
330
+ counts = np .zeros (5 , dtype = 'int64' )
331
331
values = 10 * prng .rand (10 , 2 ).astype (self .dtype )
332
- labels = np .tile (np .arange (5 ), (2 , ))
332
+ labels = np .tile (np .arange (5 ), (2 , )). astype ( 'int64' )
333
333
334
334
expected_out = np .std (
335
335
values .reshape (2 , 5 , 2 ), ddof = 1 , axis = 0 ) ** 2
@@ -343,10 +343,10 @@ def test_group_var_generic_2d_some_nan(self):
343
343
prng = RandomState (1234 )
344
344
345
345
out = (np .nan * np .ones ((5 , 2 ))).astype (self .dtype )
346
- counts = np .zeros (5 , dtype = int )
346
+ counts = np .zeros (5 , dtype = 'int64' )
347
347
values = 10 * prng .rand (10 , 2 ).astype (self .dtype )
348
348
values [:, 1 ] = np .nan
349
- labels = np .tile (np .arange (5 ), (2 , ))
349
+ labels = np .tile (np .arange (5 ), (2 , )). astype ( 'int64' )
350
350
351
351
expected_out = np .vstack ([
352
352
values [:, 0 ].reshape (5 , 2 , order = 'F' ).std (ddof = 1 , axis = 1 ) ** 2 ,
@@ -362,9 +362,9 @@ def test_group_var_constant(self):
362
362
# Regression test from GH 10448.
363
363
364
364
out = np .array ([[np .nan ]], dtype = self .dtype )
365
- counts = np .array ([0 ])
365
+ counts = np .array ([0 ], dtype = 'int64' )
366
366
values = 0.832845131556193 * np .ones ((3 , 1 ), dtype = self .dtype )
367
- labels = np .zeros (3 , dtype = np . int )
367
+ labels = np .zeros (3 , dtype = 'int64' )
368
368
369
369
self .algo (out , counts , values , labels )
370
370
@@ -386,10 +386,10 @@ def test_group_var_large_inputs(self):
386
386
prng = RandomState (1234 )
387
387
388
388
out = np .array ([[np .nan ]], dtype = self .dtype )
389
- counts = np .array ([0 ])
389
+ counts = np .array ([0 ], dtype = 'int64' )
390
390
values = (prng .rand (10 ** 6 ) + 10 ** 12 ).astype (self .dtype )
391
391
values .shape = (10 ** 6 , 1 )
392
- labels = np .zeros (10 ** 6 , dtype = np . int )
392
+ labels = np .zeros (10 ** 6 , dtype = 'int64' )
393
393
394
394
self .algo (out , counts , values , labels )
395
395
0 commit comments