@@ -33,14 +33,12 @@ and the rest of the library
33
33
"""
34
34
35
35
36
- import numpy
37
36
import dpnp.config as config
38
-
39
37
from dpnp.dpnp_algo cimport *
40
- from dpnp.dparray cimport dparray
41
38
42
39
cimport dpnp.dpnp_utils as utils
43
40
41
+ import numpy
44
42
cimport numpy
45
43
46
44
@@ -147,7 +145,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_beta(double a, double b, size):
147
145
148
146
"""
149
147
150
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
148
+ # convert string type names (array .dtype) to C enum DPNPFuncType
151
149
cdef DPNPFuncType param1_type = dpnp_dtype_to_DPNPFuncType(numpy.float64)
152
150
153
151
# get the FPTR data structure
@@ -178,7 +176,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_binomial(int ntrial, double p, size):
178
176
cdef DPNPFuncData kernel_data
179
177
cdef fptr_dpnp_rng_binomial_c_1out_t func
180
178
181
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
179
+ # convert string type names (array .dtype) to C enum DPNPFuncType
182
180
param1_type = dpnp_dtype_to_DPNPFuncType(dtype)
183
181
184
182
# get the FPTR data structure
@@ -203,7 +201,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_chisquare(int df, size):
203
201
204
202
"""
205
203
206
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
204
+ # convert string type names (array .dtype) to C enum DPNPFuncType
207
205
cdef DPNPFuncType param1_type = dpnp_dtype_to_DPNPFuncType(numpy.float64)
208
206
209
207
# get the FPTR data structure
@@ -229,7 +227,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_exponential(double beta, size):
229
227
"""
230
228
231
229
dtype = numpy.float64
232
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
230
+ # convert string type names (array .dtype) to C enum DPNPFuncType
233
231
cdef DPNPFuncType param1_type = dpnp_dtype_to_DPNPFuncType(dtype)
234
232
235
233
# get the FPTR data structure
@@ -254,7 +252,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_f(double df_num, double df_den, size):
254
252
"""
255
253
256
254
dtype = numpy.float64
257
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
255
+ # convert string type names (array .dtype) to C enum DPNPFuncType
258
256
cdef DPNPFuncType param1_type = dpnp_dtype_to_DPNPFuncType(dtype)
259
257
260
258
# get the FPTR data structure
@@ -313,7 +311,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_geometric(float p, size):
313
311
cdef DPNPFuncData kernel_data
314
312
cdef fptr_dpnp_rng_geometric_c_1out_t func
315
313
316
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
314
+ # convert string type names (array .dtype) to C enum DPNPFuncType
317
315
param1_type = dpnp_dtype_to_DPNPFuncType(dtype)
318
316
319
317
# get the FPTR data structure
@@ -370,7 +368,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_hypergeometric(int l, int s, int m, size):
370
368
cdef DPNPFuncData kernel_data
371
369
cdef fptr_dpnp_rng_hypergeometric_c_1out_t func
372
370
373
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
371
+ # convert string type names (array .dtype) to C enum DPNPFuncType
374
372
param1_type = dpnp_dtype_to_DPNPFuncType(dtype)
375
373
376
374
# get the FPTR data structure
@@ -400,7 +398,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_laplace(double loc, double scale, size):
400
398
cdef DPNPFuncData kernel_data
401
399
cdef fptr_dpnp_rng_laplace_c_1out_t func
402
400
403
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
401
+ # convert string type names (array .dtype) to C enum DPNPFuncType
404
402
param1_type = dpnp_dtype_to_DPNPFuncType(dtype)
405
403
406
404
# get the FPTR data structure
@@ -425,7 +423,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_logistic(double loc, double scale, size):
425
423
426
424
"""
427
425
428
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
426
+ # convert string type names (array .dtype) to C enum DPNPFuncType
429
427
cdef DPNPFuncType param1_type = dpnp_dtype_to_DPNPFuncType(numpy.float64)
430
428
431
429
# get the FPTR data structure
@@ -455,7 +453,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_lognormal(double mean, double stddev, size)
455
453
cdef DPNPFuncData kernel_data
456
454
cdef fptr_dpnp_rng_lognormal_c_1out_t func
457
455
458
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
456
+ # convert string type names (array .dtype) to C enum DPNPFuncType
459
457
param1_type = dpnp_dtype_to_DPNPFuncType(dtype)
460
458
461
459
# get the FPTR data structure
@@ -491,7 +489,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_multinomial(int ntrial, p, size):
491
489
cdef double * p_vector = < double * > numpy.PyArray_DATA(p)
492
490
cdef size_t p_vector_size = len (p)
493
491
494
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
492
+ # convert string type names (array .dtype) to C enum DPNPFuncType
495
493
param1_type = dpnp_dtype_to_DPNPFuncType(dtype)
496
494
497
495
# get the FPTR data structure
@@ -534,7 +532,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_multivariate_normal(numpy.ndarray mean, num
534
532
mean_vector_size = mean.size
535
533
cov_vector_size = cov.size
536
534
537
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
535
+ # convert string type names (array .dtype) to C enum DPNPFuncType
538
536
param1_type = dpnp_dtype_to_DPNPFuncType(dtype)
539
537
540
538
# get the FPTR data structure
@@ -576,7 +574,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_negative_binomial(double a, double p, size)
576
574
elif p == 1.0 :
577
575
return dpnp_full(size, 0 , dtype)
578
576
else :
579
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
577
+ # convert string type names (array .dtype) to C enum DPNPFuncType
580
578
param1_type = dpnp_dtype_to_DPNPFuncType(dtype)
581
579
582
580
# get the FPTR data structure
@@ -601,7 +599,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_noncentral_chisquare(double df, double nonc
601
599
602
600
"""
603
601
604
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
602
+ # convert string type names (array .dtype) to C enum DPNPFuncType
605
603
cdef DPNPFuncType param1_type = dpnp_dtype_to_DPNPFuncType(numpy.float64)
606
604
607
605
# get the FPTR data structure
@@ -636,7 +634,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_normal(double loc, double scale, size):
636
634
if scale == 0.0 :
637
635
return dpnp_full(size, loc, dtype)
638
636
else :
639
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
637
+ # convert string type names (array .dtype) to C enum DPNPFuncType
640
638
param1_type = dpnp_dtype_to_DPNPFuncType(dtype)
641
639
642
640
# get the FPTR data structure
@@ -662,7 +660,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_pareto(double alpha, size):
662
660
"""
663
661
664
662
dtype = numpy.float64
665
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
663
+ # convert string type names (array .dtype) to C enum DPNPFuncType
666
664
cdef DPNPFuncType param1_type = dpnp_dtype_to_DPNPFuncType(dtype)
667
665
668
666
# get the FPTR data structure
@@ -698,7 +696,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_poisson(double lam, size):
698
696
if lam == 0 :
699
697
return dpnp_full(size, 0 , dtype)
700
698
else :
701
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
699
+ # convert string type names (array .dtype) to C enum DPNPFuncType
702
700
param1_type = dpnp_dtype_to_DPNPFuncType(dtype)
703
701
704
702
# get the FPTR data structure
@@ -723,7 +721,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_power(double alpha, size):
723
721
"""
724
722
725
723
dtype = numpy.float64
726
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
724
+ # convert string type names (array .dtype) to C enum DPNPFuncType
727
725
cdef DPNPFuncType param1_type = dpnp_dtype_to_DPNPFuncType(dtype)
728
726
729
727
# get the FPTR data structure
@@ -750,7 +748,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_randn(dims):
750
748
cdef double mean = 0.0
751
749
cdef double stddev = 1.0
752
750
753
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
751
+ # convert string type names (array .dtype) to C enum DPNPFuncType
754
752
cdef DPNPFuncType param1_type = dpnp_dtype_to_DPNPFuncType(numpy.float64)
755
753
756
754
# get the FPTR data structure
@@ -776,7 +774,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_random(dims):
776
774
cdef long low = 0
777
775
cdef long high = 1
778
776
779
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
777
+ # convert string type names (array .dtype) to C enum DPNPFuncType
780
778
cdef DPNPFuncType param1_type = dpnp_dtype_to_DPNPFuncType(numpy.float64)
781
779
782
780
# get the FPTR data structure
@@ -811,7 +809,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_rayleigh(double scale, size):
811
809
if scale == 0.0 :
812
810
return dpnp_full(size, 0.0 , dtype)
813
811
else :
814
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
812
+ # convert string type names (array .dtype) to C enum DPNPFuncType
815
813
param1_type = dpnp_dtype_to_DPNPFuncType(dtype)
816
814
817
815
# get the FPTR data structure
@@ -834,7 +832,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_shuffle(utils.dpnp_descriptor x1):
834
832
835
833
"""
836
834
837
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
835
+ # convert string type names (array .dtype) to C enum DPNPFuncType
838
836
cdef DPNPFuncType param1_type = dpnp_dtype_to_DPNPFuncType(x1.dtype.type)
839
837
cdef size_t itemsize = x1.dtype.itemsize
840
838
cdef size_t ndim = x1.ndim
@@ -856,7 +854,7 @@ cpdef dpnp_rng_srand(seed):
856
854
857
855
"""
858
856
859
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
857
+ # convert string type names (array .dtype) to C enum DPNPFuncType
860
858
cdef DPNPFuncType param1_type = dpnp_dtype_to_DPNPFuncType(numpy.float64)
861
859
862
860
# get the FPTR data structure
@@ -875,7 +873,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_standard_cauchy(size):
875
873
876
874
"""
877
875
878
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
876
+ # convert string type names (array .dtype) to C enum DPNPFuncType
879
877
cdef DPNPFuncType param1_type = dpnp_dtype_to_DPNPFuncType(numpy.float64)
880
878
881
879
# get the FPTR data structure
@@ -902,7 +900,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_standard_exponential(size):
902
900
903
901
cdef fptr_dpnp_rng_standard_exponential_c_1out_t func
904
902
905
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
903
+ # convert string type names (array .dtype) to C enum DPNPFuncType
906
904
cdef DPNPFuncType param1_type = dpnp_dtype_to_DPNPFuncType(numpy.float64)
907
905
908
906
# get the FPTR data structure
@@ -937,7 +935,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_standard_gamma(double shape, size):
937
935
if shape == 0.0 :
938
936
return dpnp_full(size, 0.0 , dtype)
939
937
else :
940
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
938
+ # convert string type names (array .dtype) to C enum DPNPFuncType
941
939
param1_type = dpnp_dtype_to_DPNPFuncType(dtype)
942
940
943
941
# get the FPTR data structure
@@ -962,7 +960,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_standard_normal(size):
962
960
963
961
"""
964
962
965
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
963
+ # convert string type names (array .dtype) to C enum DPNPFuncType
966
964
cdef DPNPFuncType param1_type = dpnp_dtype_to_DPNPFuncType(numpy.float64)
967
965
968
966
# get the FPTR data structure
@@ -986,7 +984,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_standard_t(double df, size):
986
984
987
985
"""
988
986
989
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
987
+ # convert string type names (array .dtype) to C enum DPNPFuncType
990
988
cdef DPNPFuncType param1_type = dpnp_dtype_to_DPNPFuncType(numpy.float64)
991
989
992
990
# get the FPTR data structure
@@ -1012,7 +1010,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_triangular(double left, double mode, double
1012
1010
"""
1013
1011
1014
1012
dtype = numpy.float64
1015
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
1013
+ # convert string type names (array .dtype) to C enum DPNPFuncType
1016
1014
cdef DPNPFuncType param1_type = dpnp_dtype_to_DPNPFuncType(dtype)
1017
1015
1018
1016
# get the FPTR data structure
@@ -1047,7 +1045,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_uniform(long low, long high, size, dtype):
1047
1045
if low == high:
1048
1046
return dpnp_full(size, low, dtype)
1049
1047
else :
1050
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
1048
+ # convert string type names (array .dtype) to C enum DPNPFuncType
1051
1049
param1_type = dpnp_dtype_to_DPNPFuncType(dtype)
1052
1050
1053
1051
# get the FPTR data structure
@@ -1072,7 +1070,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_vonmises(double mu, double kappa, size):
1072
1070
1073
1071
"""
1074
1072
1075
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
1073
+ # convert string type names (array .dtype) to C enum DPNPFuncType
1076
1074
cdef DPNPFuncType param1_type = dpnp_dtype_to_DPNPFuncType(numpy.float64)
1077
1075
1078
1076
# get the FPTR data structure
@@ -1098,7 +1096,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_wald(double mean, double scale, size):
1098
1096
"""
1099
1097
1100
1098
dtype = numpy.float64
1101
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
1099
+ # convert string type names (array .dtype) to C enum DPNPFuncType
1102
1100
cdef DPNPFuncType param1_type = dpnp_dtype_to_DPNPFuncType(dtype)
1103
1101
1104
1102
# get the FPTR data structure
@@ -1128,7 +1126,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_weibull(double a, size):
1128
1126
cdef DPNPFuncData kernel_data
1129
1127
cdef fptr_dpnp_rng_weibull_c_1out_t func
1130
1128
1131
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
1129
+ # convert string type names (array .dtype) to C enum DPNPFuncType
1132
1130
param1_type = dpnp_dtype_to_DPNPFuncType(numpy.float64)
1133
1131
1134
1132
# get the FPTR data structure
@@ -1153,7 +1151,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_zipf(double a, size):
1153
1151
1154
1152
"""
1155
1153
1156
- # convert string type names (dparray .dtype) to C enum DPNPFuncType
1154
+ # convert string type names (array .dtype) to C enum DPNPFuncType
1157
1155
cdef DPNPFuncType param1_type = dpnp_dtype_to_DPNPFuncType(numpy.float64)
1158
1156
1159
1157
# get the FPTR data structure
0 commit comments