First time here? Check out the FAQ!
1

Code Warnings: Attribute undefined: .float32 of np: numpy module

I use the following code snippet in my script:

   import numpy as np
   ...
   eig=np.zeros((nks,nbnd),dtype=np.float32)

In this case, wing will give the Code Warnings:

Attribute undefined: .float32 of np: numpy module

But in fact, this is the correct usage for numpy. Any hints for this problem?

hongyi-zhao's avatar
547
hongyi-zhao
asked 2020-07-08 10:16:31 -0500
Wingware Support's avatar
4.1k
Wingware Support
updated 2020-07-08 14:20:24 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

It looks like float32 is a symbol that is dynamically created at runtime so Wing's source analyzer doesn't know it exists. For things like this, just click the red X to hide the warning.

Wingware Support's avatar
4.1k
Wingware Support
answered 2020-07-08 14:20:06 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer