[yt-svn] commit/yt: 3 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Mon May 1 08:13:10 PDT 2017
3 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/8c7acf669f3a/
Changeset: 8c7acf669f3a
Branch: yt
User: ngoldbaum
Date: 2017-04-24 21:54:55+00:00
Summary: Ensure object arrays are sanitized as string arrays when saving light rays
Affected #: 1 file
diff -r 634cc55bf0668d551109b3a35850bb6c369b47b4 -r 8c7acf669f3a7ae555b65c8ea390b56b763acfa9 yt/analysis_modules/cosmological_observation/light_ray/light_ray.py
--- a/yt/analysis_modules/cosmological_observation/light_ray/light_ray.py
+++ b/yt/analysis_modules/cosmological_observation/light_ray/light_ray.py
@@ -689,7 +689,12 @@
to_arr = YTArray
else:
to_arr = np.array
- extra_attrs["light_ray_solution_%s" % key] = to_arr(lrsa)
+ arr = to_arr(lrsa)
+ # If we somehow create an object array, convert it to a string
+ # to avoid errors later
+ if arr.dtype == 'O':
+ arr = arr.astype(str)
+ extra_attrs["light_ray_solution_%s" % key] = arr
field_types = dict([(field, "grid") for field in data.keys()])
https://bitbucket.org/yt_analysis/yt/commits/0c8c82746b0a/
Changeset: 0c8c82746b0a
Branch: yt
User: ngoldbaum
Date: 2017-04-24 21:55:15+00:00
Summary: Ensure Enzo datasets can't be created with unique_identifier of None
Affected #: 1 file
diff -r 8c7acf669f3a7ae555b65c8ea390b56b763acfa9 -r 0c8c82746b0a4bd9aa1fdf8ade5ebda28a3cca1e yt/frontends/enzo/data_structures.py
--- a/yt/frontends/enzo/data_structures.py
+++ b/yt/frontends/enzo/data_structures.py
@@ -852,7 +852,7 @@
self.unique_identifier = self.parameters["CurrentTimeIdentifier"]
else:
self.unique_identifier = \
- int(os.stat(self.parameter_filename)[stat.ST_CTIME])
+ str(int(os.stat(self.parameter_filename)[stat.ST_CTIME]))
if self.dimensionality > 1:
self.domain_dimensions = self.parameters["TopGridDimensions"]
if len(self.domain_dimensions) < 3:
@@ -873,11 +873,6 @@
self.periodicity += (False, False)
self.gamma = self.parameters["Gamma"]
- # To be enabled when we can break old pickles:
- #if "MetaDataSimulationUUID" in self.parameters:
- # self.unique_identifier = self.parameters["MetaDataSimulationUUID"]
- self.unique_identifier = self.parameters.get("MetaDataDatasetUUID",
- self.parameters.get("CurrentTimeIdentifier", None))
if self.parameters["ComovingCoordinates"]:
self.cosmological_simulation = 1
self.current_redshift = self.parameters["CosmologyCurrentRedshift"]
https://bitbucket.org/yt_analysis/yt/commits/7d5ef3be2dd8/
Changeset: 7d5ef3be2dd8
Branch: yt
User: ngoldbaum
Date: 2017-05-01 15:13:06+00:00
Summary: Merged in ngoldbaum/yt (pull request #2589)
Fix for light ray saving issue
Approved-by: Britton Smith <brittonsmith at gmail.com>
Approved-by: Kacper Kowalik <xarthisius.kk at gmail.com>
Affected #: 2 files
diff -r f7b293c10f5ab50860b0d6df59d908bda5ca8178 -r 7d5ef3be2dd810cb64faab4838b195e9604f9f71 yt/analysis_modules/cosmological_observation/light_ray/light_ray.py
--- a/yt/analysis_modules/cosmological_observation/light_ray/light_ray.py
+++ b/yt/analysis_modules/cosmological_observation/light_ray/light_ray.py
@@ -689,7 +689,12 @@
to_arr = YTArray
else:
to_arr = np.array
- extra_attrs["light_ray_solution_%s" % key] = to_arr(lrsa)
+ arr = to_arr(lrsa)
+ # If we somehow create an object array, convert it to a string
+ # to avoid errors later
+ if arr.dtype == 'O':
+ arr = arr.astype(str)
+ extra_attrs["light_ray_solution_%s" % key] = arr
field_types = dict([(field, "grid") for field in data.keys()])
diff -r f7b293c10f5ab50860b0d6df59d908bda5ca8178 -r 7d5ef3be2dd810cb64faab4838b195e9604f9f71 yt/frontends/enzo/data_structures.py
--- a/yt/frontends/enzo/data_structures.py
+++ b/yt/frontends/enzo/data_structures.py
@@ -852,7 +852,7 @@
self.unique_identifier = self.parameters["CurrentTimeIdentifier"]
else:
self.unique_identifier = \
- int(os.stat(self.parameter_filename)[stat.ST_CTIME])
+ str(int(os.stat(self.parameter_filename)[stat.ST_CTIME]))
if self.dimensionality > 1:
self.domain_dimensions = self.parameters["TopGridDimensions"]
if len(self.domain_dimensions) < 3:
@@ -873,11 +873,6 @@
self.periodicity += (False, False)
self.gamma = self.parameters["Gamma"]
- # To be enabled when we can break old pickles:
- #if "MetaDataSimulationUUID" in self.parameters:
- # self.unique_identifier = self.parameters["MetaDataSimulationUUID"]
- self.unique_identifier = self.parameters.get("MetaDataDatasetUUID",
- self.parameters.get("CurrentTimeIdentifier", None))
if self.parameters["ComovingCoordinates"]:
self.cosmological_simulation = 1
self.current_redshift = self.parameters["CosmologyCurrentRedshift"]
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list