Problème avec Numpy

77 views
Skip to first unread message

Nolwenn DALLAY

unread,
Feb 11, 2021, 4:36:36 AM2/11/21
to Pyzo
Bonjour à toutes à tous, 
je suis novice dans l'utilisation du langage python. Je rencontre des difficultés avec l'utilisation de la fonction numpy. La console m'indique à chaque fois que numpy a bien été installé mais je  ne parviens pas à utiliser les fonctions np.arange et np.array. Lorsque je tape dir(np) toutes les fonctions qui se rattachent à Numpy apparaissent sauf arange et array. 
J'ai tout essayé. J'ai désinstallé la fonction numpy puis je l'ai réinstallée, j'ai même désinstallé l'environnement de travail pyzo, le logiciel python de mon ordinateur et les ai réinstallés mais le problème persiste. 
Est-ce que quelqu'un pourrait m'éclaire sur ce point s'il vous plaît ?
Je vous remercie d'avance. 
Bien à vous.
Nolwenn.

Almar Klein

unread,
Feb 12, 2021, 3:36:54 AM2/12/21
to Pyzo
Hi Nolwenn,

(My French is not very good, replying in English.)

Could you please describe in more details what happens when you try to use these functions? For example, what do you get when you replicate this:

>>> import numpy as np

>>> np

<module 'numpy' from 'c:\\pythons\\python39\\lib\\site-packages\\numpy\\__init__.py'>

>>> np.arange(9)

array([0, 1, 2, 3, 4, 5, 6, 7, 8])

>>> "arange" in dir(np)

True


In particular, if there are error messages, these can help determine what goes wrong.

One possible pitfall that may cause this is that you have a directory called "numpy", or file called "numpy.py" that is causing Python to attempt to import "your version" of numpy.

Regards,
  Almar
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyzo+uns...@googlegroups.com.

Laura Panossian

unread,
Nov 7, 2021, 9:59:23 AM11/7/21
to Pyzo
Hi Almar,

I tried to use the numpy module but there's an error in the shell. How can I know that function is already installed in my computer please ?

Have a good day

Almar Klein

unread,
Nov 8, 2021, 4:36:34 AM11/8/21
to Pyzo
Hi Laura,

Could you please copy-paste the error here? Otherwise I don't know what's going on :)

Best,
  Almar
Reply all
Reply to author
Forward
0 new messages