Skip to content

BUG: ValueError: putmask: output array is read-only #6773

Closed
@YarShev

Description

@YarShev

Modin version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest released version of Modin.

  • I have confirmed this bug exists on the main branch of Modin. (In order to do this you can follow this guide.)

Reproducible Example

import numpy as np
import modin.pandas as pd

df = pd.DataFrame([[np.nan, 2, np.nan, 0],
                   [3, 4, np.nan, 1],
                   [np.nan, np.nan, np.nan, np.nan],
                   [np.nan, 3, np.nan, 4]],
                  columns=list("ABCD"))

pdf = df._to_pandas()
pdf.fillna(0, inplace=True)
# ValueError: putmask: output array is read-only

Issue Description

The error happens when operating a pandas df.

Expected Behavior

There shouldn't be an issue. The error probably happens after #4778 is merged. We should also check if to_numpy gives no error when operating a numpy array inplace after converting from modin.

cc @anmyachev

Error Logs

Replace this line with the error backtrace (if applicable).

Installed Versions

...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🦗Something isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions