From aa8571da656fadcf4b3dee93ae67023ffdc2d460 Mon Sep 17 00:00:00 2001 From: Gabor Kovacs Date: Mon, 13 Jun 2016 18:39:43 +0100 Subject: [PATCH] Fix indexing with int array --- astroscrappy/astroscrappy.pyx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/astroscrappy/astroscrappy.pyx b/astroscrappy/astroscrappy.pyx index 28b1eb8..d4addde 100644 --- a/astroscrappy/astroscrappy.pyx +++ b/astroscrappy/astroscrappy.pyx @@ -338,7 +338,8 @@ def detect_cosmics(indat, inmask=None, float sigclip=4.5, float sigfrac=0.3, # otherwise clean the image and iterate if cleantype == 'median': # Unmasked median filter - cleanarr[crmask] = m5[crmask] + cindices = crmask.nonzero() + cleanarr[cindices] = m5[cindices] del m5 # Masked mean filter elif cleantype == 'meanmask':