spyder中用不了np.nonezero?

#我在spyder中的函数定义如下

`

``def load_and_trim(path):
    audio, sr = librosa.load(path)
    energy = librosa.feature.rmse(audio)
    frames = np.nonzero(energy >= np.max(energy) / 5)
    indices = librosa.core.frames_to_samples(frames)[1]
    audio = audio[indices[0]:indices[-1]] if indices.size else audio[0:0]
return audio, sr



###### 运行结果及报错内容 
代码分析给我提示一个错误:
undefined name 'np'(pyflokes E)
为什么未定义'np',‘np’不应该是和np.nonzero是一个整体吗,我在这块代码前已经import了numpy了啊

import numpy as np