<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def JSON_NumpyArrayEncoder(obj):
    '''Define Specialize JSON encoder for numpy array'''
    if isinstance(obj, np.ndarray):
        return {'numpyArray': obj.tolist(),
                'dtype': obj.dtype.__str__()}
    elif isinstance(obj, np.generic):
        return np.asscalar(obj)
    else:
        print type(obj)
        raise TypeError(repr(obj) + " is not JSON serializable")