vegas 6.1.3__cp310-cp310-win_amd64.whl → 6.2.1__cp310-cp310-win_amd64.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,25 @@ 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
45
40
  cdef public double neval_frac
46
41
  cdef public double max_mem
47
- cdef public numpy.npy_intp nitn
48
- cdef public numpy.npy_intp nproc
42
+ cdef public Py_ssize_t nitn
43
+ cdef public Py_ssize_t nproc
49
44
  cdef public double alpha
50
45
  cdef public double rtol
51
46
  cdef public double atol
@@ -61,22 +56,22 @@ cdef class Integrator:
61
56
  cdef public bint uses_jac
62
57
  cdef public str save
63
58
  cdef public str saveall
64
- cdef readonly numpy.npy_intp[::1] nstrat
59
+ cdef readonly Py_ssize_t[::1] nstrat
65
60
  cdef readonly object xsample
66
61
  # generated
67
62
  cdef readonly AdaptiveMap map
68
63
  cdef readonly object pool
69
64
  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
65
+ cdef readonly Py_ssize_t dim
66
+ cdef readonly Py_ssize_t last_neval
67
+ cdef readonly Py_ssize_t min_neval_hcube
68
+ cdef readonly Py_ssize_t nhcube
74
69
  # internal work areas
75
70
  cdef double[:, ::1] y
76
71
  cdef double[:, ::1] x
77
72
  cdef double[::1] jac
78
73
  cdef double[::1] fdv2
79
- cdef numpy.npy_intp[::1] neval_hcube
74
+ cdef Py_ssize_t[::1] neval_hcube
80
75
  # the following depend upon whether minimize_mem is False or True
81
76
  cdef readonly object sigf # numpy array or h5py Dataset
82
77
  cdef readonly object sigf_h5 # None or h5py file