Skip to content

Commit

Permalink
minor fixed float -> float64
Browse files Browse the repository at this point in the history
  • Loading branch information
rajeshrinet committed Sep 23, 2023
1 parent d4baa37 commit 3dcd974
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion pygl/dms.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cimport cython
from libc.math cimport sqrt, pow
cdef double PI = 3.14159265359
from scipy.sparse import spdiags
DTYPE = np.float
DTYPE = np.float64
ctypedef np.float_t DTYPE_t


Expand Down Expand Up @@ -64,6 +64,8 @@ cdef class FD:
*weights of the m-th order derivative using central Difference
*this can be read from the table if the code needs to be made fast
*first generate the table using the code!
Read more: Bengt Fornberg SIAM Review, Vol. 40, No. 3 (Sep., 1998)
Calculation of Weights in Finite Difference Formulas
'''
cdef int i, j, k, ii, jj
wts=np.zeros((m+1, self.s), dtype=DTYPE)
Expand Down
2 changes: 1 addition & 1 deletion pygl/solvers.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ cdef double gaussianRn() nogil:
def getRN():
return (gaussianRn())

DTYPE = np.float
DTYPE = np.float64
ctypedef np.float_t DTYPE_t
@cython.wraparound(False)
@cython.boundscheck(False)
Expand Down
4 changes: 2 additions & 2 deletions pygl/utils.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ cdef extern from "time.h":
# srand48(time(0))
srand48(100)

DTYPE = np.float
DTYPE = np.float64
DTYP1 = np.int32
ctypedef np.float_t DTYPE_t

Expand Down Expand Up @@ -126,7 +126,7 @@ def azimuthalAverage2(u):
nr = rind[1:] - rind[:-1] # number of radius bin

# Cumulative sum to figure out sums for each radius bin
csim = np.cumsum(i_sorted, dtype=float)
csim = np.cumsum(i_sorted, dtype=np.float64)
tbin = csim[rind[1:]] - csim[rind[:-1]]

ur = tbin / nr
Expand Down

0 comments on commit 3dcd974

Please sign in to comment.