Social Media

Python – remove nth element from array

I was looking at sampling algorithms, and realised it was overkill for my task. Instead I found a useful numpy feature –

Here we remove every 3rd element! Easy!

About the Author Martin Farrell

My name is Martin Farrell. I have almost 20 years Java experience. I specialize inthe Spring Framework and JEE. I’ve consulted to a range of businesses, and have provide Java and Spring mentoring and training. You can learn more at About or on my consultancy website Glendevon Software

follow me on:

Leave a Comment: