Commit 06721060 authored by Malthe Kjær Bisbo's avatar Malthe Kjær Bisbo
Browse files

modified moduse structure, added test of imports and changed documentation...

modified moduse structure, added test of imports and changed documentation accordingly as some import statements have changed as a result
parent 752fd85b
......@@ -5,21 +5,20 @@ import numpy as np
import pickle
from os.path import isfile
from surrogate.gpr import GPR
from population import population
from ase import Atoms
from ase.io import read, write, Trajectory
from ase.calculators.singlepoint import SinglePointCalculator
from ase.calculators.dftb import Dftb
from utils import array_to_string
from parallel_utils import split, parallel_function_eval
from gofee.surrogate import GPR
from gofee.population import Population
from gofee.utils import array_to_string
from gofee.parallel_utils import split, parallel_function_eval
from bfgslinesearch_constrained import relax
from gofee.bfgslinesearch_constrained import relax
from candidate_operations.candidate_generation import CandidateGenerator
from candidate_operations.basic_mutations import RattleMutation
from gofee.candidates import CandidateGenerator
from gofee.candidates import RattleMutation
from mpi4py import MPI
world = MPI.COMM_WORLD
......@@ -213,7 +212,7 @@ class GOFEE():
self.gpr = GPR(template_structure=self.structures[0])
# Initialize population
self.population = population(population_size=population_size, gpr=self.gpr, similarity2equal=0.9999)
self.population = Population(population_size=population_size, gpr=self.gpr, similarity2equal=0.9999)
else:
self.read()
self.comm.barrier()
......
......@@ -2,7 +2,7 @@ import numpy as np
from ase.calculators.singlepoint import SinglePointCalculator
from ase import Atoms
class population():
class Population():
def __init__(self, population_size, gpr, similarity2equal=0.9999):
self.pop_size = population_size
......
from gofee.surrogate.gpr import GPR
from gofee.surrogate.descriptor.fingerprint import Fingerprint
from gofee.surrogate.prior.prior import RepulsivePrior
__all__ = ['GPR', 'Fingerprint', 'RepulsivePrior']
\ No newline at end of file
......@@ -810,7 +810,7 @@ static const char *__pyx_f[] = {
"cymem.pxd",
};
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":730
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":730
* # in Cython to enable them only on the right systems.
*
* ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
......@@ -819,7 +819,7 @@ static const char *__pyx_f[] = {
*/
typedef npy_int8 __pyx_t_5numpy_int8_t;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":731
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":731
*
* ctypedef npy_int8 int8_t
* ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
......@@ -828,7 +828,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t;
*/
typedef npy_int16 __pyx_t_5numpy_int16_t;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":732
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":732
* ctypedef npy_int8 int8_t
* ctypedef npy_int16 int16_t
* ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
......@@ -837,7 +837,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t;
*/
typedef npy_int32 __pyx_t_5numpy_int32_t;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":733
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":733
* ctypedef npy_int16 int16_t
* ctypedef npy_int32 int32_t
* ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
......@@ -846,7 +846,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t;
*/
typedef npy_int64 __pyx_t_5numpy_int64_t;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":737
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":737
* #ctypedef npy_int128 int128_t
*
* ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
......@@ -855,7 +855,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t;
*/
typedef npy_uint8 __pyx_t_5numpy_uint8_t;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":738
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":738
*
* ctypedef npy_uint8 uint8_t
* ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
......@@ -864,7 +864,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t;
*/
typedef npy_uint16 __pyx_t_5numpy_uint16_t;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":739
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":739
* ctypedef npy_uint8 uint8_t
* ctypedef npy_uint16 uint16_t
* ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
......@@ -873,7 +873,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t;
*/
typedef npy_uint32 __pyx_t_5numpy_uint32_t;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":740
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":740
* ctypedef npy_uint16 uint16_t
* ctypedef npy_uint32 uint32_t
* ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
......@@ -882,7 +882,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t;
*/
typedef npy_uint64 __pyx_t_5numpy_uint64_t;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":744
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":744
* #ctypedef npy_uint128 uint128_t
*
* ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
......@@ -891,7 +891,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t;
*/
typedef npy_float32 __pyx_t_5numpy_float32_t;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":745
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":745
*
* ctypedef npy_float32 float32_t
* ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
......@@ -900,7 +900,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t;
*/
typedef npy_float64 __pyx_t_5numpy_float64_t;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":754
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":754
* # The int types are mapped a bit surprising --
* # numpy.int corresponds to 'l' and numpy.long to 'q'
* ctypedef npy_long int_t # <<<<<<<<<<<<<<
......@@ -909,7 +909,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t;
*/
typedef npy_long __pyx_t_5numpy_int_t;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":755
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":755
* # numpy.int corresponds to 'l' and numpy.long to 'q'
* ctypedef npy_long int_t
* ctypedef npy_longlong long_t # <<<<<<<<<<<<<<
......@@ -918,7 +918,7 @@ typedef npy_long __pyx_t_5numpy_int_t;
*/
typedef npy_longlong __pyx_t_5numpy_long_t;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":756
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":756
* ctypedef npy_long int_t
* ctypedef npy_longlong long_t
* ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
......@@ -927,7 +927,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t;
*/
typedef npy_longlong __pyx_t_5numpy_longlong_t;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":758
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":758
* ctypedef npy_longlong longlong_t
*
* ctypedef npy_ulong uint_t # <<<<<<<<<<<<<<
......@@ -936,7 +936,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t;
*/
typedef npy_ulong __pyx_t_5numpy_uint_t;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":759
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":759
*
* ctypedef npy_ulong uint_t
* ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<<
......@@ -945,7 +945,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t;
*/
typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":760
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":760
* ctypedef npy_ulong uint_t
* ctypedef npy_ulonglong ulong_t
* ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
......@@ -954,7 +954,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
*/
typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":762
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":762
* ctypedef npy_ulonglong ulonglong_t
*
* ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
......@@ -963,7 +963,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
*/
typedef npy_intp __pyx_t_5numpy_intp_t;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":763
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":763
*
* ctypedef npy_intp intp_t
* ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
......@@ -972,7 +972,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t;
*/
typedef npy_uintp __pyx_t_5numpy_uintp_t;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":765
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":765
* ctypedef npy_uintp uintp_t
*
* ctypedef npy_double float_t # <<<<<<<<<<<<<<
......@@ -981,7 +981,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t;
*/
typedef npy_double __pyx_t_5numpy_float_t;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":766
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":766
*
* ctypedef npy_double float_t
* ctypedef npy_double double_t # <<<<<<<<<<<<<<
......@@ -990,7 +990,7 @@ typedef npy_double __pyx_t_5numpy_float_t;
*/
typedef npy_double __pyx_t_5numpy_double_t;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":767
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":767
* ctypedef npy_double float_t
* ctypedef npy_double double_t
* ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
......@@ -1027,7 +1027,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(do
struct __pyx_obj_5cymem_5cymem_Pool;
struct __pyx_obj_5cymem_5cymem_Address;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":769
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":769
* ctypedef npy_longdouble longdouble_t
*
* ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<<
......@@ -1036,7 +1036,7 @@ struct __pyx_obj_5cymem_5cymem_Address;
*/
typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":770
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":770
*
* ctypedef npy_cfloat cfloat_t
* ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<<
......@@ -1045,7 +1045,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
*/
typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":771
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":771
* ctypedef npy_cfloat cfloat_t
* ctypedef npy_cdouble cdouble_t
* ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<<
......@@ -1054,7 +1054,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
*/
typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":773
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":773
* ctypedef npy_clongdouble clongdouble_t
*
* ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<<
......@@ -12401,7 +12401,7 @@ static PyObject *__pyx_pf_11fingerprint_11Fingerprint_12__get_neighbour_cells_di
return __pyx_r;
}
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":215
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":215
* # experimental exception made for __getbuffer__ and __releasebuffer__
* # -- the details of this may change.
* def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
......@@ -12449,7 +12449,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
__Pyx_GIVEREF(__pyx_v_info->obj);
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":222
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":222
*
* cdef int i, ndim
* cdef int endian_detector = 1 # <<<<<<<<<<<<<<
......@@ -12458,7 +12458,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_endian_detector = 1;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":223
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":223
* cdef int i, ndim
* cdef int endian_detector = 1
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
......@@ -12467,7 +12467,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":225
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":225
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
*
* ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<<
......@@ -12476,7 +12476,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_ndim = PyArray_NDIM(__pyx_v_self);
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":227
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":227
* ndim = PyArray_NDIM(self)
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
......@@ -12490,7 +12490,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
goto __pyx_L4_bool_binop_done;
}
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":228
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":228
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): # <<<<<<<<<<<<<<
......@@ -12501,7 +12501,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = __pyx_t_2;
__pyx_L4_bool_binop_done:;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":227
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":227
* ndim = PyArray_NDIM(self)
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
......@@ -12510,7 +12510,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
if (unlikely(__pyx_t_1)) {
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":229
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":229
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
* raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
......@@ -12523,7 +12523,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(1, 229, __pyx_L1_error)
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":227
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":227
* ndim = PyArray_NDIM(self)
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
......@@ -12532,7 +12532,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
}
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":231
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":231
* raise ValueError(u"ndarray is not C contiguous")
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
......@@ -12546,7 +12546,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
goto __pyx_L7_bool_binop_done;
}
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":232
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":232
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): # <<<<<<<<<<<<<<
......@@ -12557,7 +12557,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = __pyx_t_2;
__pyx_L7_bool_binop_done:;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":231
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":231
* raise ValueError(u"ndarray is not C contiguous")
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
......@@ -12566,7 +12566,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
if (unlikely(__pyx_t_1)) {
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":233
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":233
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
* raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
......@@ -12579,7 +12579,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(1, 233, __pyx_L1_error)
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":231
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":231
* raise ValueError(u"ndarray is not C contiguous")
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
......@@ -12588,7 +12588,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
}
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":235
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":235
* raise ValueError(u"ndarray is not Fortran contiguous")
*
* info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<<
......@@ -12597,7 +12597,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->buf = PyArray_DATA(__pyx_v_self);
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":236
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":236
*
* info.buf = PyArray_DATA(self)
* info.ndim = ndim # <<<<<<<<<<<<<<
......@@ -12606,7 +12606,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->ndim = __pyx_v_ndim;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":237
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":237
* info.buf = PyArray_DATA(self)
* info.ndim = ndim
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
......@@ -12616,7 +12616,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
if (__pyx_t_1) {
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":240
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":240
* # Allocate new buffer for strides and shape info.
* # This is allocated as one block, strides first.
* info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim) # <<<<<<<<<<<<<<
......@@ -12625,7 +12625,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim))));
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":241
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":241
* # This is allocated as one block, strides first.
* info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
* info.shape = info.strides + ndim # <<<<<<<<<<<<<<
......@@ -12634,7 +12634,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":242
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":242
* info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
* info.shape = info.strides + ndim
* for i in range(ndim): # <<<<<<<<<<<<<<
......@@ -12646,7 +12646,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
__pyx_v_i = __pyx_t_6;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":243
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":243
* info.shape = info.strides + ndim
* for i in range(ndim):
* info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<<
......@@ -12655,7 +12655,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
(__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":244
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":244
* for i in range(ndim):
* info.strides[i] = PyArray_STRIDES(self)[i]
* info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<<
......@@ -12665,7 +12665,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
(__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
}
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":237
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":237
* info.buf = PyArray_DATA(self)
* info.ndim = ndim
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
......@@ -12675,7 +12675,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
goto __pyx_L9;
}
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":246
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":246
* info.shape[i] = PyArray_DIMS(self)[i]
* else:
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self) # <<<<<<<<<<<<<<
......@@ -12685,7 +12685,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
/*else*/ {
__pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":247
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":247
* else:
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
* info.shape = <Py_ssize_t*>PyArray_DIMS(self) # <<<<<<<<<<<<<<
......@@ -12696,7 +12696,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
}
__pyx_L9:;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":248
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":248
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
* info.shape = <Py_ssize_t*>PyArray_DIMS(self)
* info.suboffsets = NULL # <<<<<<<<<<<<<<
......@@ -12705,7 +12705,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->suboffsets = NULL;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":249
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":249
* info.shape = <Py_ssize_t*>PyArray_DIMS(self)
* info.suboffsets = NULL
* info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<<
......@@ -12714,7 +12714,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":250
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":250
* info.suboffsets = NULL
* info.itemsize = PyArray_ITEMSIZE(self)
* info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<<
......@@ -12723,7 +12723,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0));
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":253
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":253
*
* cdef int t
* cdef char* f = NULL # <<<<<<<<<<<<<<
......@@ -12732,7 +12732,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
__pyx_v_f = NULL;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":254
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":254
* cdef int t
* cdef char* f = NULL
* cdef dtype descr = self.descr # <<<<<<<<<<<<<<
......@@ -12744,7 +12744,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_descr = ((PyArray_Descr *)__pyx_t_3);
__pyx_t_3 = 0;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":257
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":257
* cdef int offset
*
* info.obj = self # <<<<<<<<<<<<<<
......@@ -12757,7 +12757,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__Pyx_DECREF(__pyx_v_info->obj);
__pyx_v_info->obj = ((PyObject *)__pyx_v_self);
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":259
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":259
* info.obj = self
*
* if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<<
......@@ -12767,7 +12767,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0);
if (__pyx_t_1) {
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":260
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":260
*
* if not PyDataType_HASFIELDS(descr):
* t = descr.type_num # <<<<<<<<<<<<<<
......@@ -12777,7 +12777,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_4 = __pyx_v_descr->type_num;
__pyx_v_t = __pyx_t_4;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":261
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":261
* if not PyDataType_HASFIELDS(descr):
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
......@@ -12797,7 +12797,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
}
__pyx_L15_next_or:;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":262
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":262
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or
* (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
......@@ -12814,7 +12814,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_t_1 = __pyx_t_2;
__pyx_L14_bool_binop_done:;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":261
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":261
* if not PyDataType_HASFIELDS(descr):
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
......@@ -12823,7 +12823,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
if (unlikely(__pyx_t_1)) {
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":263
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":263
* if ((descr.byteorder == c'>' and little_endian) or
* (descr.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
......@@ -12836,7 +12836,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(1, 263, __pyx_L1_error)
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":261
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":261
* if not PyDataType_HASFIELDS(descr):
* t = descr.type_num
* if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
......@@ -12845,7 +12845,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
*/
}
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":264
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":264
* (descr.byteorder == c'<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported")
* if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<<
......@@ -12857,7 +12857,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = ((char *)"b");
break;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":265
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":265
* raise ValueError(u"Non-native byte order not supported")
* if t == NPY_BYTE: f = "b"
* elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<<
......@@ -12868,7 +12868,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = ((char *)"B");
break;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":266
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":266
* if t == NPY_BYTE: f = "b"
* elif t == NPY_UBYTE: f = "B"
* elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<<
......@@ -12879,7 +12879,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
__pyx_v_f = ((char *)"h");
break;
 
/* "../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":267
/* "../../../../../virtualEnvs/python-3.6.3/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":267