Why does the Numpy array filter above generate [0, 1, 1, 2, 3, 5, 8]?
In this case, indexes 0,1,2,3,4,6 and 8 of the filter array are included in the updated filter because it includes only values for which the filter array has the value True.
Utilize the items at indexes 0,2,3 and 5 to generate a true palindrome array:
Because the updated filter only displays values for which the filter array has the value True, indexes 0, 2, 3, and 5 of the filter array are displayed.
Create a Filter Array
Since we are investigating Numpy array filters, the True and False values in the example above are hard-coded, but filter arrays are usually built dependent on conditions.
The following filter array will produce only values greater than 39:
Example: 
import numpy as npy
greater_arr = npy.array([5,18,62,47,36,94,78])
# Make a list that is void
mrxfilter_arr = []
# In even_arr, iterate over each number
for mrx in greater_arr:
# Set the value to True if the number is even, otherwise False:
if mrx>39:
mrxfilter_arr.append(True)
else:
mrxfilter_arr.append(False)
ample_arr = greater_arr[mrxfilter_arr]
print(mrxfilter_arr)
print(ample_arr)
Display only words whose length is equal to five with a filter array:
Example: 
import numpy as npy
words_arr = npy.array(["Adapt","Baker","Laptop","Sneakers","Cable","Firm","Dagon","Eagle","Wire","Ideal"])
# Make a list that is void
mrxfilter_arr = []
# In even_arr, iterate over each number
for mrx in words_arr:
# Set the value to True if the number is even, otherwise False:
if len(mrx) == 5:
mrxfilter_arr.append(True)
else:
mrxfilter_arr.append(False)
ample_arr = words_arr[mrxfilter_arr]
print(mrxfilter_arr)
print(ample_arr)
Make a filter array that will display only even numbers:
Example: 
import numpy as npy
even_arr = npy.array([0, 1, 2, 3, 4 ,6, 8, 9, 10, 12])
# Make a list that is void
mrxfilter_arr = []
# In even_arr, iterate over each number
for mrx in even_arr:
# Set the value to True if the number is even, otherwise False:
if mrx%2 == 0:
mrxfilter_arr.append(True)
else:
mrxfilter_arr.append(False)
ample_arr = even_arr[mrxfilter_arr]
print(mrxfilter_arr)
print(ample_arr)
import numpy as npy
odd_arr = npy.array([0, 1, 2, 3, 4, 5, 6,7, 8, 9, 10, 11, 12, 13])
# Make a list that is void
mrxfilter_arr = []
# In even_arr, iterate over each number
for mrx in odd_arr:
# Set the value to True if the number is even, otherwise False:
if mrx%2 != 0:
mrxfilter_arr.append(True)
else:
mrxfilter_arr.append(False)
ample_arr = odd_arr[mrxfilter_arr]
print(mrxfilter_arr)
print(ample_arr)
Array-Based Filter Creation
As it comes to Numpy array filters, NumPy offers a convenient approach to interacting with the above example.
If we replace the array in place of an iterable variable in our condition, it will work as it should.
Only values larger than 39 will be obtained from the following filter array: