Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Import of collections.Hashable fails in Python 3.10 #79

Open
@PTriebold

Description

@PTriebold

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): macOS 12.6
  • Python version: 3.10.7
  • NumPy version: 1.23.3

Describe the current behavior
import of numpy_ml fails due to an ImportError with the collections module.

Describe the expected behavior
Importing just the module should not generate an ImportError

Code to reproduce the issue

# Python 3.10 or newerimportnumpy_ml

Other info / logs
In Python 3.10 the deprecated aliases were removed.

Remove deprecated aliases toCollections Abstract Base Classes from thecollections module. (Contributed by Victor Stinner inbpo-37324.)

fromWhat’s New In Python 3.10

fix
To fix the bug, in/numpy_ml/utils/data_structures.py change

fromcollectionsimportHashable

to

fromcollections.abcimportHashable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp