Skip to content

Commit

Permalink
Merge pull request #169 from Ablinne/ab/fix_168
Browse files Browse the repository at this point in the history
Fix #168
  • Loading branch information
Ablinne authored Mar 13, 2018
2 parents a7cb0c4 + d8deaed commit ec4f7ed
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions postpic/io/vtk.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
objects from a given `Field`.
Data: Superclass for representing either `PointData` or `CellData`. So far only
`PointData is used. This will be used to contain a subclass of `ArrayData`.
`PointData` is used. This will be used to contain a subclass of `ArrayData`.
ArrayData: Superclass for representing a collection of `Scalars` or `Vectors` that are stored in
an array that will be created from one or more `Field`s.
Expand Down Expand Up @@ -220,7 +220,8 @@ def __init__(self, *fields, **kwargs):
if self.name is None:
# catch not only the case that 'name' is not present in kwargs,
# but also the case that None was explicitly passed
getattr(fields[0], 'name', '')
self.name = getattr(fields[0], 'name', 'None')
self.name = str(self.name).replace(' ', '_')

def transform_data(self, dtype):
data = np.vstack((np.ravel(f, order='F') for f in self.fields))
Expand Down

0 comments on commit ec4f7ed

Please sign in to comment.