Skip to content

Commit 3224c12

Browse files
author
davidcorteso
committed
Cleaned up NEB Cython declarations
1 parent 3a5daab commit 3224c12

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

fidimag/common/neb_method/nebm_geodesic_clib.pyx

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
import numpy
2-
cimport numpy as np
3-
np.import_array()
4-
5-
61
cdef extern from "nebm_geodesic_lib.h":
72

83
double compute_distance_geodesic(double * A, double * B, int n_dofs_image,
@@ -24,13 +19,13 @@ cdef extern from "nebm_lib.h":
2419
)
2520

2621

27-
def compute_spring_force(np.ndarray[double, ndim=1, mode="c"] spring_force,
28-
np.ndarray[double, ndim=1, mode="c"] y,
29-
np.ndarray[double, ndim=1, mode="c"] tangents,
22+
def compute_spring_force(double [:] spring_force,
23+
double [:] y,
24+
double [:] tangents,
3025
k,
3126
n_images,
3227
n_dofs_image,
33-
np.ndarray[int, ndim=1, mode="c"] material,
28+
int [:] material,
3429
n_dofs_image_material
3530
):
3631

@@ -40,10 +35,10 @@ def compute_spring_force(np.ndarray[double, ndim=1, mode="c"] spring_force,
4035
&material[0], n_dofs_image_material
4136
)
4237

43-
def geodesic_distance(np.ndarray[double, ndim=1, mode="c"] A,
44-
np.ndarray[double, ndim=1, mode="c"] B,
38+
def geodesic_distance(double [:] A,
39+
double [:] B,
4540
n_dofs_image,
46-
np.ndarray[int, ndim=1, mode="c"] material,
41+
int [:] material,
4742
n_dofs_image_material
4843
):
4944

0 commit comments

Comments
 (0)