# Path: astroNN/config.py
# MAGIC_NUMBER = magic_num_reader()


import astropy.units as u
import numpy as np
from astroNN.config import MAGIC_NUMBER
# ---------------------------------------------------------------#
#   astroNN.nn.numpy: tools written with numpy instead of tf
# ---------------------------------------------------------------#



def sigmoid(x):
    """
    NumPy implementation of tf.sigmoid, mask ``magicnumber``

    :param x: Data to be applied sigmoid activation
    :type x: Union[ndarray, float]
    :return: Sigmoid activated data
    :rtype: Union[ndarray, float]
    :History: 2018-Apr-11 - Written - Henry Leung (University of Toronto)
    """

# Path: astroNN/config.py
# MAGIC_NUMBER = magic_num_reader()


# Path: astroNN/nn/numpy.py
import astropy.units as u
import numpy as np
from astroNN.config import MAGIC_NUMBER

# ---------------------------------------------------------------#
#   astroNN.nn.numpy: tools written with numpy instead of tf
# ---------------------------------------------------------------#



def sigmoid(x):
    """
    NumPy implementation of tf.sigmoid, mask ``magicnumber``

    :param x: Data to be applied sigmoid activation
    :type x: Union[ndarray, float]
    :return: Sigmoid activated data
    :rtype: Union[ndarray, float]
    :History: 2018-Apr-11 - Written - Henry Leung (University of Toronto)
    """

    x = np.ma.array(x, mask=(x == MAGIC_NUMBER))