Bonjour,
alors je tente de créer la fonction classification tel que:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
def classification(a, b, c, d):
	t=0
	if (-90.00<=float(a)<=-30.00) and (-60.00<=float(b)<=0) and (-120.00<=float(c)<=-60.00) and (-30.00<=float(d)<=30.00):
		t=1
	if (-50.00<=float(a)<=-20.00) and (-60.00<=float(b)<=0) and (-160.00<=float(c)<=-20.00) and (-30.00<=float(d)<=30.00):
		t=2
	return t
mais lorsque que je lance mon programme en appelant les fonction, j'ai une erreur!!

Traceback (most recent call last):
File "myprog0.6.py", line 64, in <module>
T=classification(residu1[4], residu1[5], residu2[4], residu2[5])
TypeError: 'dict' object is not callable

En revanche si je met ma condition dans mon programme principale, ça fonctionne bien.

Quelqu'un connait-il cette erreur?? pourriez vous m'aider.