|  |  |  | @ -28,12 +28,9 @@ static PyObject* genFunc(PyObject* self, PyObject* args) | 
		
	
		
			
				|  |  |  |  |     struct vario_mod variogram; | 
		
	
		
			
				|  |  |  |  |     long seed; | 
		
	
		
			
				|  |  |  |  |     struct statistic_mod stat; | 
		
	
		
			
				|  |  |  |  |     PyArrayObject* out_array; | 
		
	
		
			
				|  |  |  |  |     PyObject* out_array; | 
		
	
		
			
				|  |  |  |  |     npy_intp out_dims[NPY_MAXDIMS]; | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     out_array = (PyArrayObject *) PyArray_FromDims(NDIMENSIONS,out_dims,NPY_DOUBLE); | 
		
	
		
			
				|  |  |  |  |     Y.vector = (double *) out_array->data; | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     if (!Py_getvalues(args, &seed, &grid, &variogram, &stat)) | 
		
	
		
			
				|  |  |  |  |         return NULL; | 
		
	
		
			
				|  |  |  |  |     Py_kgeneration(seed, grid, stat, variogram, &Z, &Y, n); | 
		
	
	
		
			
				
					|  |  |  | @ -42,12 +39,11 @@ static PyObject* genFunc(PyObject* self, PyObject* args) | 
		
	
		
			
				|  |  |  |  |     out_dims[1] = grid.NY; | 
		
	
		
			
				|  |  |  |  |     out_dims[2] = grid.NX; | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     out_array = (PyArrayObject*)PyArray_SimpleNewFromData(NDIMENSIONS, out_dims, NPY_DOUBLE, Y.vector); | 
		
	
		
			
				|  |  |  |  |     out_array = PyArray_SimpleNewFromData(NDIMENSIONS, out_dims, NPY_DOUBLE, Y.vector); | 
		
	
		
			
				|  |  |  |  |     if (out_array == NULL) | 
		
	
		
			
				|  |  |  |  |         return NULL; | 
		
	
		
			
				|  |  |  |  |     // PyArray_ENABLEFLAGS(out_array, NPY_ARRAY_OWNDATA);
 | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     // out_array->flags |= NPY_ARRAY_OWNDATA;
 | 
		
	
		
			
				|  |  |  |  |     PyArray_ENABLEFLAGS(out_array, NPY_ARRAY_OWNDATA); | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     free(stat.mean); | 
		
	
		
			
				|  |  |  |  |     free(stat.variance); | 
		
	
	
		
			
				
					|  |  |  | 
 |