Skip to content

Commit c0fcab4

Browse files
committed
misc: Remove double import of ctypes in allocators
1 parent 9595621 commit c0fcab4

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

devito/data/allocators.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import mmap
44
import os
55
import sys
6-
from ctypes.util import find_library
76

87
import numpy as np
98

@@ -153,7 +152,7 @@ class PosixAllocator(MemoryAllocator):
153152

154153
@classmethod
155154
def initialize(cls):
156-
handle = find_library('c')
155+
handle = ctypes.util.find_library('c')
157156

158157
# Special case: on MacOS Big Sur any code that attempts to check
159158
# for dynamic library presence by looking for a file at a path
@@ -274,7 +273,7 @@ class NumaAllocator(MemoryAllocator):
274273

275274
@classmethod
276275
def initialize(cls):
277-
handle = find_library('numa')
276+
handle = ctypes.util.find_library('numa')
278277
if handle is None:
279278
return
280279
lib = ctypes.CDLL(handle)

0 commit comments

Comments
 (0)