2

I am trying to use scipy.generic_filter to process an image. However, I need to further subset the window within the function I am applying. In another words I need to know the process (function) used to convert the 2D window to 1D array within the generic filter, so I can recreate the 2D array within the applied function in the right way. Does anybody know what function doe the scipy filter use to reshape the 2D to 1D?

Tereza_S
  • 21
  • 1

1 Answers1

0

This is really late, but the data that gets passed to your filter function is a numpy array. You should just be able to reshape the data like normal

arr = arr.reshape((y, x))

Will.Evo
  • 1,112
  • 13
  • 31