Skip to content

Commit 83d7f50

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

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

devito/data/allocators.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import abc
22
import ctypes
3+
import ctypes.util
34
import mmap
45
import os
56
import sys
6-
from ctypes.util import find_library
77

88
import numpy as np
99

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

154154
@classmethod
155155
def initialize(cls):
156-
handle = find_library('c')
156+
handle = ctypes.util.find_library('c')
157157

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

275275
@classmethod
276276
def initialize(cls):
277-
handle = find_library('numa')
277+
handle = ctypes.util.find_library('numa')
278278
if handle is None:
279279
return
280280
lib = ctypes.CDLL(handle)

0 commit comments

Comments
 (0)