Code: Alles auswählen
a=[1,2]
[2]:
import meinmodule
[3]:
b=meinmodule.meinefunk(a)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-3-38f37ffeda2b> in <module>()
----> 1 b=meinmodule.meinefunk(a)
AttributeError: module 'meinmodule' has no attribute 'meinefunk
Code: Alles auswählen
def meinefunk(x):
B=x.copy()
if type(B[0]) == int:
for Vektor in range(len(B)) :
B[Vektor]=B[Vektor]*-1
elif type(B[0]) == list :
import numpy
y = numpy.array([])
y=B
B=numpy.dot(y,-1)
return B