Skip to content
This repository was archived by the owner on Sep 25, 2025. It is now read-only.
This repository was archived by the owner on Sep 25, 2025. It is now read-only.

[BUG] <title>AttributeError: np.float_ was removed in the NumPy 2.0 release. Use np.float64 instead. #98

Description

@Brigidi

Is there an existing issue for this?

  • I have searched the existing issues

Have you installed the latest development version of the package(s) in question?

  • I have installed the latest development version of the package.

If this is a data issue, have you tried clearing your nflverse cache?

I have cleared my nflverse cache and the issue persists.

What version of the package do you have?

0.3.2

Describe the bug

The latest version of numpy does not include np.float_, which breaks the import_pbp_data call. Another user linked to a StackOverflow post that suggested the following:

  • uninstall numpy
  • pip install "numpy<2"

This fixes the issue and allows for the function to work as intended. I wanted to make this post for transparency, so that others who have this bug have a path to solving it.

Reprex

import nfl_data_py as nfl

# explore the pbp data
df = nfl.import_pbp_data([2023])

# print the df
print(df)

Expected Behavior

Dataframe with data.

nflverse_sitrep

NA

Screenshots

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions