Fixed gis test failures when numpy isn't installed.

Thanks to Bas Peschier for pointing this out. Refs #23804.
This commit is contained in:
Daniel Wiesmann 2015-03-20 17:12:44 +00:00 committed by Tim Graham
parent 4a5d967dfe
commit 0d9b018e07
2 changed files with 4 additions and 4 deletions

View file

@ -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)