Python Forum
Vector field cross product
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Vector field cross product
#2
I think the problem comes from the fact that By and Bz have shapes (100, 100, 100) and Bx is a number. Same with E.

It works for me with
Ex = ...
Ez = ...
Ey = np.zeros_like(Ex)
...
By = ...
Bx = np.zeros_like(By)
...
np.cross(E, B, axis=0)
The result has shape (3, 100, 100, 100). I don't know if this is what you want.
Reply


Messages In This Thread
Vector field cross product - by Eduard - Aug-20-2018, 01:09 PM
RE: Vector field cross product - by Gribouillis - Aug-20-2018, 01:55 PM
RE: Vector field cross product - by Eduard - Aug-20-2018, 02:54 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Create a function vector Cooketaker 4 1,047 Dec-27-2022, 08:22 PM
Last Post: Cooketaker
  Executing Scipy Tensor Product John_Doe 1 2,449 Dec-06-2019, 10:28 AM
Last Post: paul18fr
  matrixes product paul18fr 0 2,179 Jul-18-2019, 07:32 PM
Last Post: paul18fr
  matrix by vector mcgrim 8 3,963 May-02-2019, 10:39 AM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020