Why can py.numpy.array not be resolved?
Afficher commentaires plus anciens
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()
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Call Python from MATLAB dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!