import numpy as np

def create_k_steps(k_span, steps):
    """
    A function that returns a k_span gradient span with odd and even gradient steps
    """
    k_steps = np.array(range(steps+1))
    
    if (np.mod(steps,2) == 0):      
        k_steps = ( k_steps - steps/2 ) / (steps/2)
    else:
        k_steps = ( k_steps - (steps+1)/2 ) / (steps/2)
    
    k_steps = np.flip(k_steps,0)
    k_steps = np.delete(k_steps,-1)
    return k_steps*k_span*0.5        
