Skip to content

Numpy monkey patches #2134

@StephenJamesCashen

Description

@StephenJamesCashen

Describe the bug
A clear and concise description of what the bug is.

Ideallypandera doesn't have the numpy monkey patches in _patch_numpy2.py. Had to spend some time this week trying to understand why numpy wasn't behaving as expected.

I imagine this requires updating to pyspark==4.0, I have no knowledge as to how much of a PITA that is, but ideally a public package like this isn't mucking around with other package internals, especially not numpy.

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest version of pandera.
  • (optional) I have confirmed this bug exists on the main branch of pandera.

Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.

Code Sample, a copy-pastable example

import numpy as np
np.float_

Expected behavior

A clear and concise description of what you expected to happen.

Accessing np.float_ should fail loudly.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser: [e.g. chrome, safari]
  • Version: [e.g. 22]

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions