Skip to content

full inconsistency with NumPy for dtype=None #8947

@tomwhite

Description

@tomwhite

What happened: Calling full with an integer fill value and dtype=None returns a float array rather than an int array, which is what happens in NumPy.

What you expected to happen: Behaviour the same as NumPy.

Minimal Complete Verifiable Example:

>>> import numpy as np
>>> np.full(1, 0, dtype=None).dtype
dtype('int64')
>>> import dask.array as da
>>> da.full(1, 0, dtype=None).dtype
dtype('float64')

Anything else we need to know?:

Environment:

  • Dask version: main
  • Python version: 3.8
  • Operating System: mac
  • Install method (conda, pip, source): source
Cluster Dump State:

Metadata

Metadata

Assignees

No one assigned

    Labels

    arraybugSomething is broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions