def adapt_ndarray(obj):
 if (obj.ndim == 0):
  return float(obj)
 else:
  return adapt_obj(obj)

def adapt_ndarray ( obj ) : if ( obj . ndim == 0 ) : return float ( obj ) else : return adapt_obj ( obj )
convert numpy scalars to floats before storing in sqlite .