# How to calculate the element-wise absolute value of NumPy array in Python 
# import library
import numpy as np
  
# create a numpy 1d-array
array = np.array([1, -2, 3])
  
print("Given array:\n", array)
  
# find element-wise
# absolute value
rslt = np.absolute(array)
  
print("Absolute array:\n", rslt)