Skip to content

nnfs/core.py line 49 -- Attribute Error - astype #7

@dundeemt

Description

@dundeemt

I'm sure it is on my side or config, but it is not apparent. help.
Running in a venv, versions and details below.
Simplified to the extreme and reproducible.

Python 3.8.10 (default, Nov 22 2023, 10:22:35)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import numpy as np
import nnfs
nnfs.init()
f = np.random.randn() * 0.1
Traceback (most recent call last):
File "", line 1, in
File "/home/jlh/sync/AI/nnfs/nnfs/lib/python3.8/site-packages/nnfs/core.py", line 49, in enclosed_method
return method[4](*args, **kwargs).astype(default_dtype)
AttributeError: 'float' object has no attribute 'astype'
np.version
'1.24.4'
nnfs.version
'0.5.1

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