'Attempt to convert numpy.ma.core.masked'

@staticmethod
def encode_as_numpy(obj):

    if (not numpy):
        raise NotEncodable
    if (obj is numpy.ma.core.masked):
        return float('nan')
    else:
        raise NotEncodable
