From 943a855b8514dd5e465c3ae6e46275ce8c21c183 Mon Sep 17 00:00:00 2001 From: bue Date: Sat, 1 Jul 2023 11:51:07 -0400 Subject: [PATCH] @ python-loader : replace deprecated np.float with np.float64 and update VERSION.txt file to correct version number. --- VERSION.txt | 2 +- pyMCDS.py | 8 ++++---- pyMCDS_timeseries.py | 4 +--- read_MultiCellDS_xml.py | 6 +++--- timeseries_set/read_MultiCellDS_xml.py | 6 +++--- 5 files changed, 12 insertions(+), 14 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index 7dea76e..524cb55 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -1.0.1 +1.1.1 diff --git a/pyMCDS.py b/pyMCDS.py index 2e6b179..5982b73 100644 --- a/pyMCDS.py +++ b/pyMCDS.py @@ -203,7 +203,7 @@ def get_concentrations(self, species_name, z_slice=None): a plane of voxel centers in the z-axis. Returns ------- - conc_arr : array (np.float) shape=[nx_voxels, ny_voxels, nz_voxels] + conc_arr : array (np.float64) shape=[nx_voxels, ny_voxels, nz_voxels] Contains the concentration of the specified chemical in each voxel. The array spatially maps to a meshgrid of the voxel centers. """ @@ -354,15 +354,15 @@ def _read_xml(self, xml_file, output_path='.'): # while we're at it, find the mesh coord_str = mesh_node.find('x_coordinates').text delimiter = mesh_node.find('x_coordinates').get('delimiter') - x_coords = np.array(coord_str.split(delimiter), dtype=np.float) + x_coords = np.array(coord_str.split(delimiter), dtype=np.float64) coord_str = mesh_node.find('y_coordinates').text delimiter = mesh_node.find('y_coordinates').get('delimiter') - y_coords = np.array(coord_str.split(delimiter), dtype=np.float) + y_coords = np.array(coord_str.split(delimiter), dtype=np.float64) coord_str = mesh_node.find('z_coordinates').text delimiter = mesh_node.find('z_coordinates').get('delimiter') - z_coords = np.array(coord_str.split(delimiter), dtype=np.float) + z_coords = np.array(coord_str.split(delimiter), dtype=np.float64) # reshape into a mesh grid xx, yy, zz = np.meshgrid(x_coords, y_coords, z_coords) diff --git a/pyMCDS_timeseries.py b/pyMCDS_timeseries.py index e291ad7..a4a1e22 100644 --- a/pyMCDS_timeseries.py +++ b/pyMCDS_timeseries.py @@ -38,7 +38,7 @@ def get_times(self): Returns ------- - time_array : ndaray (np.float) [n_timesteps,] + time_array : ndaray (np.float64) [n_timesteps,] Contains the 'current time' at each recorded point. ''' time_array = np.zeros(self.timeseries.shape[0]) @@ -93,5 +93,3 @@ def plot_cell_type_counts(self): ax.set_ylabel('# of cells in system') ax.legend() plt.show() - - diff --git a/read_MultiCellDS_xml.py b/read_MultiCellDS_xml.py index b1a1690..e3af7bb 100644 --- a/read_MultiCellDS_xml.py +++ b/read_MultiCellDS_xml.py @@ -40,15 +40,15 @@ def read_MultiCellDS_xml(xml_file, output_path='.'): # while we're at it, find the mesh coord_str = mesh_node.find('x_coordinates').text delimiter = mesh_node.find('x_coordinates').get('delimiter') - x_coords = np.array(coord_str.split(delimiter), dtype=np.float) + x_coords = np.array(coord_str.split(delimiter), dtype=np.float64) coord_str = mesh_node.find('y_coordinates').text delimiter = mesh_node.find('y_coordinates').get('delimiter') - y_coords = np.array(coord_str.split(delimiter), dtype=np.float) + y_coords = np.array(coord_str.split(delimiter), dtype=np.float64) coord_str = mesh_node.find('z_coordinates').text delimiter = mesh_node.find('z_coordinates').get('delimiter') - z_coords = np.array(coord_str.split(delimiter), dtype=np.float) + z_coords = np.array(coord_str.split(delimiter), dtype=np.float64) # reshape into a mesh grid xx, yy, zz = np.meshgrid(x_coords, y_coords, z_coords) diff --git a/timeseries_set/read_MultiCellDS_xml.py b/timeseries_set/read_MultiCellDS_xml.py index 87ea2bb..4d6f461 100644 --- a/timeseries_set/read_MultiCellDS_xml.py +++ b/timeseries_set/read_MultiCellDS_xml.py @@ -48,15 +48,15 @@ def read_MultiCellDS_xml(file_name, output_dir = '.'): # while we're at it, find the mesh coord_str = mesh_node.find('x_coordinates').text delimiter = mesh_node.find('x_coordinates').get('delimiter') - x_coords = np.array(coord_str.split(delimiter), dtype=np.float) + x_coords = np.array(coord_str.split(delimiter), dtype=np.float64) coord_str = mesh_node.find('y_coordinates').text delimiter = mesh_node.find('y_coordinates').get('delimiter') - y_coords = np.array(coord_str.split(delimiter), dtype=np.float) + y_coords = np.array(coord_str.split(delimiter), dtype=np.float64) coord_str = mesh_node.find('z_coordinates').text delimiter = mesh_node.find('z_coordinates').get('delimiter') - z_coords = np.array(coord_str.split(delimiter), dtype=np.float) + z_coords = np.array(coord_str.split(delimiter), dtype=np.float64) # reshape into a mesh grid xx, yy, zz = np.meshgrid(x_coords, y_coords, z_coords)