Skip to content

Instantly share code, notes, and snippets.

@zhargal05450
zhargal05450 / згидшс
Created November 26, 2015 01:21
фыафыафыафы
фыа
@pstoll
pstoll / run.txt
Last active November 26, 2015 01:22
Sample showing the power of slices and letting callers specify the output array for NumPy like ufuncs
primesieve-python pstoll$ python testnumpy.py
straight into array: [ 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71]
offset by 10: [ 0 0 0 0 0 0 0 0 0 0 2 3 5 7 11 13 17 19 23 29]
strided by 2: [ 2 0 3 0 5 0 7 0 11 0 13 0 17 0 19 0 23 0 29 0]