Changeset 643


Ignore:
Timestamp:
12/19/17 16:27:19 (6 years ago)
Author:
dubos
Message:

devel/unstructured : workaround cython bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • codes/icosagcm/devel/Python/src/unstructured.pyx

    r642 r643  
    22import math 
    33import numpy as np 
     4cimport numpy as np 
    45import dynamico.wrap as wrap 
    56from ctypes import c_void_p, c_int, c_double, c_bool 
    67 
    7 from libc.time cimport time as ctime, time_t 
    8 cimport numpy as np 
     8#from libc.time cimport time as ctime, time_t 
     9from numpy cimport ndarray 
    910 
    1011#------------- direct Cython interface to DYNAMICO routines -------------# 
     
    9394    return data 
    9495 
    95 cdef check_ptr(name, dbl_ptr p, np.ndarray data): 
     96cdef check_ptr(name, dbl_ptr p, ndarray data): 
    9697    if p != ptr(data) : print name, 'p <> ptr(data) !!' 
    9798         
     
    105106    cdef dbl_ptr p_dPhi_fast, p_dPhi_slow, p_dW_fast, p_dW_slow                # tendencies 
    106107    # allocated arrays, must remain referenced or segfault 
    107     cdef readonly np.ndarray mass, theta_rhodz, u, geopot, W 
    108     cdef readonly np.ndarray mass_col, dmass_col, ps, theta, pk, hflux, qv 
    109     cdef readonly np.ndarray drhodz, dtheta_rhodz, du_fast, du_slow 
    110     cdef readonly np.ndarray dPhi_fast, dPhi_slow, dW_fast, dW_slow 
     108    cdef readonly ndarray mass, theta_rhodz, u, geopot, W 
     109    cdef readonly ndarray mass_col, dmass_col, ps, theta, pk, hflux, qv 
     110    cdef readonly ndarray drhodz, dtheta_rhodz, du_fast, du_slow 
     111    cdef readonly ndarray dPhi_fast, dPhi_slow, dW_fast, dW_slow 
    111112 
    112113    def __init__(self,mesh,time_scheme, nstep): 
Note: See TracChangeset for help on using the changeset viewer.