Skip to content

Commit

Permalink
added impor_array call
Browse files Browse the repository at this point in the history
  • Loading branch information
gjkennedy committed Mar 7, 2024
1 parent 429933a commit c818b17
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
7 changes: 0 additions & 7 deletions tmr/TMR.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# For MPI
cimport mpi4py.MPI as MPI

# Import numpy
cimport numpy as np
import numpy as np

# Import TACS
from tacs import TACS
from tacs.TACS import Vec, VecInterp, Assembler, Mg, Element, Function, Pc
Expand Down
6 changes: 3 additions & 3 deletions tmr/TMR.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ cimport mpi4py.MPI as MPI
cimport numpy as np
import numpy as np

# Ensure that numpy is initialized
np.import_array()

# Import the string library
from libcpp.string cimport string
from libc.string cimport strcpy
Expand All @@ -49,9 +52,6 @@ cdef tmr_init():
if not TMRIsInitialized():
TMRInitialize()

# Ensure that numpy is initialized
np.import_array()

# Initialize the MPI libraries in TMR (if not already done)
tmr_init()

Expand Down
4 changes: 0 additions & 4 deletions tmr/cpp_headers/TMR.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ cimport mpi4py.MPI as MPI
from libc.string cimport const_char
from libc.stdint cimport int32_t, int16_t

# Import numpy
cimport numpy as np
import numpy as np

# Import the definitions from the headers
from paropt.cpp_headers.ParOpt cimport ParOptScalar, ParOptVec, ParOptProblem
from tacs.cpp_headers.TACS cimport (
Expand Down

0 comments on commit c818b17

Please sign in to comment.