Skip to content

error while doing to_rgba  #10

@krishnaglodha

Description

@krishnaglodha

Im trying to generate rgba based on https://odc-stac.readthedocs.io/en/v0.2.1/notebooks/stac-load-S2-ms.html?highlight=to_rgba#Import-some-tools-from-odc.{algo,ui} ,
on last step when I'm trying to plot data

fig = one.plot.imshow(
    col_wrap=3, size=3, aspect=1, interpolation="bicubic"
)

I'm getting following error

FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
  valid = np.ones(r.shape, dtype=np.bool)
2024-06-06 14:41:03,758 - distributed.worker - WARNING - Compute Failed
Key:       ('ro_rgba-getitem-3d06572d2318cfa62cf34a5c287be2e5', 0, 0, 0)
Function:  execute_task
args:      ((<function getitem at 0x10ec5dda0>, (subgraph_callable-50060dfb59da626c0ba2a1475506b301, None, (<class 'tuple'>, [1, 3000]), array([[[1748., 1748., 1748., 2012., 2012., 1875., 1875., 1875., 1594.,
         1594., 1661., 1661., 1661., 1903., 1903., 2019.,   nan],
        [1666., 1666., 1666., 2004., 2004., 1943., 1943., 1943., 1734.,
         1734., 1632., 1632., 1632., 1926., 1926., 2014.,   nan],
        [1666., 1666., 1666., 2004., 2004., 1943., 1943., 1943., 1734.,
         1734., 1632., 1632., 1632., 1926., 1926., 2014.,   nan],
        [1666., 1666., 1666., 2004., 2004., 1943., 1943., 1943., 1734.,
         1734., 1632., 1632., 1632., 1926., 1926., 2014.,   nan],
        [1648., 1648., 1648., 2040., 2040., 1746., 1746., 1746., 1554.,
         1554., 1791., 1791., 1791., 1894., 1894., 1626.,   nan],
        [1648., 1648., 1648., 2040., 2040., 1746., 1746., 1746., 1554.,
         1554., 1791., 1791., 1791., 1894., 1894., 1626.,   nan],
        [1544., 1544., 1544., 1930., 1930., 19
kwargs:    {}
Exception: 'AttributeError("module \'numpy\' has no attribute \'bool\'.\\n`np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.\\nThe aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:\\n    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations")'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions