[Test] Fix csv test comparisons to work with Numpy 1.10
Drop support for Numpy 1.3 (which lacks the skip_header argument to genfromtxt).
This commit is contained in:
parent
fbf93bf270
commit
512dffe859
2 changed files with 4 additions and 9 deletions
|
|
@ -94,7 +94,7 @@ OS X
|
|||
|
||||
and agree to the Xcode license agreement
|
||||
|
||||
* If you don't have numpy version >= 1.3, you can install a recent version with::
|
||||
* If you don't have numpy version >= 1.4, you can install a recent version with::
|
||||
|
||||
sudo easy_install -U numpy
|
||||
|
||||
|
|
@ -437,7 +437,7 @@ Optional Programs
|
|||
* Required to build the Cantera Python module, and to run significant portions
|
||||
of the test suite.
|
||||
* http://sourceforge.net/projects/numpy/
|
||||
* Known to work with versions 1.7 and 1.8; Expected to work with version >= 1.3
|
||||
* Known to work with versions 1.7-1.9; Expected to work with version >= 1.4
|
||||
|
||||
* `Cython <http://cython.org/>`_
|
||||
|
||||
|
|
|
|||
|
|
@ -313,7 +313,6 @@ def compareCsvFiles(env, file1, file2):
|
|||
"""
|
||||
try:
|
||||
import numpy as np
|
||||
hasSkipHeader = tuple(np.version.version.split('.')[:2]) >= ('1','4')
|
||||
except ImportError:
|
||||
print 'WARNING: skipping .csv diff because numpy is not installed'
|
||||
return 0
|
||||
|
|
@ -329,12 +328,8 @@ def compareCsvFiles(env, file1, file2):
|
|||
break
|
||||
|
||||
try:
|
||||
if hasSkipHeader:
|
||||
data1 = np.genfromtxt(file1, skip_header=headerRows, delimiter=',')
|
||||
data2 = np.genfromtxt(file2, skip_header=headerRows, delimiter=',')
|
||||
else:
|
||||
data1 = np.genfromtxt(file1, skiprows=headerRows, delimiter=',')
|
||||
data2 = np.genfromtxt(file2, skiprows=headerRows, delimiter=',')
|
||||
data1 = np.genfromtxt(file1, skip_header=headerRows, delimiter=',')
|
||||
data2 = np.genfromtxt(file2, skip_header=headerRows, delimiter=',')
|
||||
except (IOError, StopIteration) as e:
|
||||
print e
|
||||
return 1
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue