Why can py.numpy.array not be resolved?
이전 댓글 표시
Hello,
I am trying run python from within Matlab. Unfortunately, I I even fail to use numpy (see below). I would very much appreciate any suggestions as to why that could be. I am using Matlab 2019b on Winows 10.
>> pyversion
version: '3.7'
executable: 'C:\Users\wolf5212\AppData\Local\Programs\Python\Python37\python.exe'
library: 'C:\Users\wolf5212\AppData\Local\Programs\Python\Python37\python37.dll'
home: 'C:\Users\wolf5212\AppData\Local\Programs\Python\Python37'
isloaded: 0
>> py.str(1)
ans =
Python str with no properties.
1.0
>> py.numpy.array([])
Unable to resolve the name py.numpy.array.
Importing numpy from the command prompt is no problem.
H:\>python
Python 3.7.6 (tags/v3.7.6:43364a7ae0, Dec 19 2019, 01:54:44) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> exit()
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!