• TypeError in Non-unique Elements


I would like to give some feedback about ...

From: https://py.checkio.org/mission/non-unique-elements/solve/


I get a ...

TypeError: <class 'list'> is wrong data type
Fail: checkio([1,2,3,1,3])

... for my script below. However, it passes the first test and I actually return a list.

import numpy as np

def checkio(data):
    counts=[data.count(i) for i in data] 
    mask=[(i>1) for i in counts]
    return data


Mozilla/5.0 (Windows NT 10.0; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0