[BUG] broadcasting(?) #182
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Current behavior
Heißt das Broadcasting? Wenn ich z.B. einem Datenset neue y-Werte zuweisen will ohne alle Werte manuell ändern zu müssen ergibt
Evaluate Expression -> "y=1"
die Fehlermeldung
[...] failed with error: ('x ((5,)) and y ((1,)) have different shapes',)
Ist das Absicht?
Mein workaround wäre
Evaluate Expression -> y=y*0+1
Version
updated today morning
Expected behavior
No response
Steps to reproduce
No response
Log messages
No response
Anything else?
No response
Ja, das ist Absicht: Wenn du y explizit mit
y = irgendwas
einen neuen Wert zuweist, und damit den alten überschreibst, muss dieses Irgendwas die gleiche Länge wie vorher haben. Deine Variante odery = np.ones(len(y))
sind da gültige Möglichkeiten.Was auch geht: Mit
y[:] = 1
die Werte in y zu ändern, ohne y an sich zu überschreiben.