magpack.vectorop.magnitude_difference#
- magnitude_difference(in_a, in_b, percent=True)#
Calculates the magnitude difference between vectors at the same positions of array a and b.
- Parameters:
- in_a, in_bnp.ndarray
The first and second vector fields to compare.
- percentbool (optional)
Set to True to calculate percentage difference, False to calculate absolute difference.
- Returns:
- np.ndarray
The magnitude difference (as a scalar field) between the two vector fields.