Please go through the post comment below, debug with the pointers mention from UNQc1 to C6.
In UNQC6, although you did use numpy sum, but I am not numpy logical is supposed to be used or not, that might be the incorrect function, giving failure on that grade function
Let me know if issue still persist.(share codes only by personal DM)