Skip to content

Change default boundary value to "none" for dask map_overlap #8391

@GenevieveBuckley

Description

@GenevieveBuckley

I'd like to propose changing the default value of the boundary keyword argument in map_overlap. The current default is "reflect", and I'd like it to be boundary="none" instead.

Reasons why this would be useful:

  • It's much faster. It roughly halves the number of tasks, and the difference in compute time is significant
  • There's less of a difference between results from a numpy array, vs the same data in a dask array (numpy doesn't do extra padding around the edges by default, so when we do this with dask, it's not equivalent anymore)
  • Users rely on default values to choose something sensible, and I think fast performance should be weighted more highly as a sensible priority.
  • Many inner functions already handle edges themselves (eg: scipy.ndimage.gaussian_filter, among many others), in which case it is redundant to handle the edges twice.

dask-image already uses boundary="none" wherever possible. We also see users concerned about performance end up doing a bit of experimentation and ending up here too.

cc @jni @jakirkham

Metadata

Metadata

Assignees

No one assigned

    Labels

    arraydiscussionDiscussing a topic with no specific actions yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions