"""====================================================
                    DESCRIPTION

=======================================================
"""
__author__ = 'ronny'

import numpy as np

#===============================================================================
#                                                              NORMALISE COLUMNS
#===============================================================================
def normalise_columns(x, mean, sd):
    """
    Normalise the elements of a 2D array to be Z-scores (standard normal values)
    scaled by some consistent mean and sd for each column(which should be the
    mean and sd of the training data)

    :param x: (2D Array)
        A 2D array, whose columns we wish to normalise
    :param mean: (1D array)
        The means to be used to normalise each of the columns of x
    :param sd: (1D array)
        The standard deviations to be used to normalise each of the columns of x
    :return: (numpy array)
        Returns an array where the elements are normalised along the columns.
    """
    # ==========================================================================
    return (np.array(x) - mean) / sd


def un_normalise_columns(z, mean, sd):
    return z*sd + mean

@@ -1188,46 +1188,984 @@
 d%0A%0A%0A
-def un_normalise_columns(z, mean, sd):
+%0A#===============================================================================%0A#                                                           UN_NORMALISE COLUMNS%0A#===============================================================================%0Adef un_normalise_columns(z, mean, sd):%0A    %22%22%22%0A    Takes a 2D array of Z-score values, along with the mean and standard%0A    deviations for each column used to calculate those z-scores. Returns the%0A    values in their original scale.%0A%0A    :param z: (2D Array)%0A        A 2D array, containing z-score values%0A    :param mean: (1D array)%0A        The means that were used to normalise each of the columns of z%0A    :param sd: (1D array)%0A        The standard deviations that were used to normalise each of the columns%0A        of z%0A    :return: (numpy array)%0A        Returns an array where the elements are the values in their original%0A        scale. .%0A    %22%22%22%0A    # ==========================================================================
 %0A   
@@ -2184,8 +2184,10 @@
  + mean%0A
+%0A%0A

Add docstring to un_normalise_columns()