Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Python
Posted by: psichic
Added: Nov 29, 2020 6:33 PM
Modified: Nov 29, 2020 6:49 PM
Views: 6
  1. #Array element deletion
  2. arr=linspace(0,2,5)
  3. arr
  4. array([ 0. ,  0.5,  1. ,  1.5,  2. ])
  5. #NB arr.del(2) works for lists, not for arrays
  6. delete(arr,2)
  7. array([ 0. ,  0.5,  1.5,  2. ])