[yt-dev] Issue #664: 2D simulation failing in 3.0 (yt_analysis/yt)

Sam Skillman issues-reply at bitbucket.org
Mon Sep 23 09:59:42 PDT 2013


New issue 664: 2D simulation failing in 3.0
https://bitbucket.org/yt_analysis/yt/issue/664/2d-simulation-failing-in-30

Sam Skillman:

A simple sliceplot of a 2D enzo simulation fails with mismatched array sizes.


```
#!python
----> 1 sl = SlicePlot(pf, 2, 'Density')

/home/skillman/local/src/yt-3.0/yt/visualization/plot_window.pyc in __init__(self, pf, axis, fields, center, width, axes_unit, origin, fontsize, field_parameters)
   1287         slc = pf.h.slice(axis, center[axis],
   1288             field_parameters = field_parameters, center=center)
-> 1289         slc.get_data(fields)
   1290         PWViewerMPL.__init__(self, slc, bounds, fields=fields, origin=origin,
   1291                              fontsize=fontsize)

/home/skillman/local/src/yt-3.0/yt/data_objects/data_containers.pyc in get_data(self, fields)
    527         # need to be generated.
    528         read_fluids, gen_fluids = self.hierarchy._read_fluid_fields(
--> 529                                         fluids, self, self._current_chunk)
    530         self.field_data.update(read_fluids)
    531 

/home/skillman/local/src/yt-3.0/yt/geometry/geometry_handler.pyc in _read_fluid_fields(self, fields, dobj, chunk)
    480             selector,
    481             fields_to_read,
--> 482             chunk_size)
    483         for field in fields_to_read:
    484             ftype, fname = field

/home/skillman/local/src/yt-3.0/yt/frontends/enzo/io.pyc in _read_fluid_selection(self, chunks, selector, fields, size)
    294                     ftype, fname = field
    295                     ds = np.atleast_3d(data[g.id].pop(fname))
--> 296                     nd = g.select(selector, ds, rv[field], ind)  # caches
    297                 ind += nd
    298                 data.pop(g.id)

/home/skillman/local/src/yt-3.0/yt/data_objects/grid_patch.pyc in select(self, selector, source, dest, offset)
    503         count = self.count(selector)
    504         if count == 0: return 0
--> 505         dest[offset:offset+count] = source[mask]
    506         return count
    507 

ValueError: operands could not be broadcast together with shapes (36,20,1) (20,36,1) 


```





More information about the yt-dev mailing list