mirror of
https://github.com/django/django.git
synced 2025-11-18 02:56:45 +00:00
Fixed gis test failures when numpy isn't installed.
Thanks to Bas Peschier for pointing this out. Refs #23804.
This commit is contained in:
parent
4a5d967dfe
commit
0d9b018e07
2 changed files with 4 additions and 4 deletions
|
|
@ -121,7 +121,7 @@ class GDALBand(GDALBase):
|
|||
access_flag = 1
|
||||
|
||||
# Instantiate ctypes array holding the input data
|
||||
if isinstance(data, (bytes, six.memoryview, numpy.ndarray)):
|
||||
if isinstance(data, (bytes, six.memoryview)) or (numpy and isinstance(data, numpy.ndarray)):
|
||||
data_array = ctypes_array.from_buffer_copy(data)
|
||||
else:
|
||||
data_array = ctypes_array(*data)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue