Skip to content

Commit ac10805

Browse files
committed
Update numpy and pandas compatibility
1 parent 3c7bf38 commit ac10805

File tree

5 files changed

+3
-48
lines changed

5 files changed

+3
-48
lines changed

PVGeo/__init__.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ def tryVTK():
4040
from .interface import *
4141
# VTK-dependent imports complete
4242

43-
from . import version
4443
from .cmaps import *
4544

4645
# Project MetaData
@@ -49,7 +48,3 @@ def tryVTK():
4948
__copyright__ = '2018, Bane Sullivan'
5049
__version__ = '3.0.1'
5150
__displayname__ = 'PVGeo'
52-
53-
54-
# Now check that NumPy is at a satisfactory version
55-
version.check_numpy()

PVGeo/filters/voxelize.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
from .. import _helpers, interface
1919
from ..base import FilterBase
20-
from ..version import check_numpy
2120
from .xyz import RotationTool
2221

2322
###############################################################################
@@ -102,8 +101,6 @@ def estimate_uniform_spacing(self, x, y, z):
102101

103102
def points_to_grid(self, xo, yo, zo, dx, dy, dz, grid=None):
104103
"""Convert XYZ points to a ``vtkUnstructuredGrid``."""
105-
if not check_numpy(alert='warn'):
106-
return grid
107104
if grid is None:
108105
grid = vtk.vtkUnstructuredGrid()
109106

PVGeo/readers/delimited.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def _file_contents_to_data_frame(self, contents):
124124
df = pd.read_csv(
125125
StringIO("\n".join(content)),
126126
names=self.get_titles(),
127-
delim_whitespace=self.get_split_on_white_space(),
127+
sep=r'\s+',
128128
)
129129
else:
130130
df = pd.read_csv(

PVGeo/ubc/tensor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def ubc_model_2d(FileName):
200200
)
201201
names = ['col%d' % i for i in range(dim[0])]
202202
df = pd.read_csv(
203-
FileName, names=names, delim_whitespace=True, skiprows=1, comment='!'
203+
FileName, names=names, sep=r'\s+', skiprows=1, comment='!'
204204
)
205205
data = df.values
206206
if np.shape(data)[0] != dim[1] and np.shape(data)[1] != dim[0]:
@@ -484,7 +484,7 @@ def _read_up_front(self):
484484
self.__indices = pd.read_csv(
485485
StringIO("\n".join(content[1::])),
486486
names=['i', 'j', 'k'],
487-
delim_whitespace=True,
487+
sep=r'\s+',
488488
)
489489
# NOTE: K indices are inverted
490490
self.need_to_read(flag=False)

PVGeo/version.py

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)