Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python compute cross product

import numpy as np

#define vectors
A = np.array([1, 2, 3])
B = np.array([4, 5, 6])
  
#calculate cross product of vectors A and B
np.cross(A, B)

[-3, 6, -3]
Comment

PREVIOUS NEXT
Code Example
Python :: how to use %s python 
Python :: why a Python Arithmetic Operators used 
Python :: how to delete item from list python 
Python :: python multiply 2 variables 
Python :: dataframe of one row 
Python :: pandas not a time nat 
Python :: how to make tkinter look modern 
Python :: df groupby 
Python :: two groupby pandas 
Python :: TypeError: ‘float’ object is not callable 
Python :: how to change value of categorical variable in python 
Python :: text from xml doc in python 
Python :: remove all na from series 
Python :: sort a dict by values 
Python :: python - join two columns and transform it as index 
Python :: big comments python 
Python :: python tkinter messagebox 
Python :: Check np.nan value 
Python :: If elif else 
Python :: imagefield django models 
Python :: list pakages installed in python 
Python :: .lift tkinter 
Python :: series to dataframe 
Python :: composition in python 
Python :: extract coordinate values in xarray 
Python :: freecodecamp python 
Python :: activate virtual environment 
Python :: pyspark read from redshift 
Python :: python for dummies 
Python :: matrix diagonal sum leetcode in Python 
ADD CONTENT
Topic
Content
Source link
Name
1+8 =