Skip to content

Commit

Permalink
fix bug with dask array for point raster (#817)
Browse files Browse the repository at this point in the history
  • Loading branch information
philipc2 authored Jun 21, 2024
1 parent 1bfbd7a commit e27a14b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions uxarray/plot/dataarray_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
import holoviews as hv
from holoviews.operation.datashader import rasterize as hds_rasterize


import numpy as np

import pandas as pd

import uxarray.plot.utils


Expand Down Expand Up @@ -227,9 +228,9 @@ def _point_raster(

uxarray.plot.utils.backend.assign(backend=backend)

# construct a dask dataframe from coordinates and data
point_dict = {"lon": lon, "lat": lat, "var": uxda.data}
point_ddf = dd.from_dict(data=point_dict, npartitions=npartitions)
point_df = pd.DataFrame.from_dict(point_dict)
point_ddf = dd.from_pandas(point_df, npartitions=npartitions)

# construct a holoviews points oobject
points = hv.Points(point_ddf, ["lon", "lat"]).opts(size=size)
Expand Down

0 comments on commit e27a14b

Please sign in to comment.