vegas 6.2__cp310-cp310-macosx_11_0_arm64.whl → 6.3__cp310-cp310-macosx_11_0_arm64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of vegas might be problematic. Click here for more details.

Binary file
vegas/_vegas.pxd CHANGED
@@ -1,6 +1,6 @@
1
1
  # cython: language_level=3
2
2
  # Created by G. Peter Lepage (Cornell University) in 12/2013.
3
- # Copyright (c) 2013-22 G. Peter Lepage.
3
+ # Copyright (c) 2013-25 G. Peter Lepage.
4
4
  #
5
5
  # This program is free software: you can redistribute it and/or modify
6
6
  # it under the terms of the GNU General Public License as published by
@@ -12,11 +12,6 @@
12
12
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
13
  # GNU General Public License for more details.
14
14
 
15
- cimport numpy
16
- numpy.import_array()
17
- # index type for numpy is numpy.npy_intp (signed)
18
- # -- same as numpy.intp_t and Py_ssize_t (usually) in Cython
19
-
20
15
  cdef class LBatchIntegrand:
21
16
  cdef public object fcn
22
17
 
@@ -27,25 +22,26 @@ cdef class AdaptiveMap:
27
22
  # first index is direction, second is increment
28
23
  cdef readonly double[:, ::1] grid
29
24
  cdef readonly double[:, ::1] inc
30
- cdef readonly numpy.npy_intp[::1] ninc
25
+ cdef readonly Py_ssize_t[::1] ninc
31
26
  cdef public double[:, ::1] sum_f
32
27
  cdef public double[:, ::1] n_f
33
28
 
34
- cpdef map(self, double[:, ::1] y, double[:, ::1] x, double[::1] J, numpy.npy_intp ny=*)
35
- cpdef invmap(self, double[:, ::1] x, double[:, ::1] y, double[::1] J, numpy.npy_intp nx=*)
36
- cpdef add_training_data(self, double[:, ::1] y, double[::1] f, numpy.npy_intp ny=*)
29
+ cpdef map(self, double[:, ::1] y, double[:, ::1] x, double[::1] J, Py_ssize_t ny=*)
30
+ cpdef invmap(self, double[:, ::1] x, double[:, ::1] y, double[::1] J, Py_ssize_t nx=*)
31
+ cpdef add_training_data(self, double[:, ::1] y, double[::1] f, Py_ssize_t ny=*)
37
32
 
38
33
  cdef class Integrator:
39
34
  # inputs
40
- cdef public numpy.npy_intp neval
41
- cdef public numpy.npy_intp[::1] neval_hcube_range
42
- cdef public numpy.npy_intp min_neval_batch
43
- cdef public numpy.npy_intp maxinc_axis
44
- cdef public numpy.npy_intp max_neval_hcube
35
+ cdef public Py_ssize_t neval
36
+ cdef public Py_ssize_t[::1] neval_hcube_range
37
+ cdef public Py_ssize_t min_neval_batch
38
+ cdef public Py_ssize_t maxinc_axis
39
+ cdef public Py_ssize_t max_neval_hcube
40
+ cdef public bint gpu_pad
45
41
  cdef public double neval_frac
46
42
  cdef public double max_mem
47
- cdef public numpy.npy_intp nitn
48
- cdef public numpy.npy_intp nproc
43
+ cdef public Py_ssize_t nitn
44
+ cdef public Py_ssize_t nproc
49
45
  cdef public double alpha
50
46
  cdef public double rtol
51
47
  cdef public double atol
@@ -61,22 +57,22 @@ cdef class Integrator:
61
57
  cdef public bint uses_jac
62
58
  cdef public str save
63
59
  cdef public str saveall
64
- cdef readonly numpy.npy_intp[::1] nstrat
60
+ cdef readonly Py_ssize_t[::1] nstrat
65
61
  cdef readonly object xsample
66
62
  # generated
67
63
  cdef readonly AdaptiveMap map
68
64
  cdef readonly object pool
69
65
  cdef readonly double sum_sigf
70
- cdef readonly numpy.npy_intp dim
71
- cdef readonly numpy.npy_intp last_neval
72
- cdef readonly numpy.npy_intp min_neval_hcube
73
- cdef readonly numpy.npy_intp nhcube
66
+ cdef readonly Py_ssize_t dim
67
+ cdef readonly Py_ssize_t last_neval
68
+ cdef readonly Py_ssize_t min_neval_hcube
69
+ cdef readonly Py_ssize_t nhcube
74
70
  # internal work areas
75
71
  cdef double[:, ::1] y
76
72
  cdef double[:, ::1] x
77
73
  cdef double[::1] jac
78
74
  cdef double[::1] fdv2
79
- cdef numpy.npy_intp[::1] neval_hcube
75
+ cdef Py_ssize_t[::1] neval_hcube
80
76
  # the following depend upon whether minimize_mem is False or True
81
77
  cdef readonly object sigf # numpy array or h5py Dataset
82
78
  cdef readonly object sigf_h5 # None or h5py file