You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rf_ipython formatting if struct contains a Tile #161
Currently if a struct / Row contains a Tile, rf_ipython doesn't do anything special for it. We should try to look inside the nested structure to see if it has a Tile to enable visualization of the Tile.
As discussed in #213 this results in a lot of rf_tile('proj_raster') to get a look at the Tile object.
The ipython formatting nicety is provided by the _repr_png_ method on the Tile class.
So when you collect a Tile to the driver and then IPython.display.display it, IPython will check if Tile class has any repr*_ methods.
One possibility may be to define a Python class that claims to be the UDT for StructType, and has a repr*_ method. But that seems a dicey proposition to me.
Activity
vpipkt commentedon Jul 26, 2019
As discussed in #213 this results in a lot of
rf_tile('proj_raster')to get a look at the Tile object.The ipython formatting nicety is provided by the
_repr_png_method on the Tile class.So when you collect a Tile to the driver and then
IPython.display.displayit, IPython will check if Tile class has any repr*_ methods.One possibility may be to define a Python class that claims to be the UDT for StructType, and has a repr*_ method. But that seems a dicey proposition to me.
Open to other possibilities here.