import tensorflow as tf

    high = constraint[key][1]
    constraint_tf[key] = (tf.constant(low, dtype=tf.float64),
                          tf.constant(high, dtype=tf.float64))


print("N.B.: using direct data entry")
likelihood = sum_pdf(data, nsig, sigmean, sigwidth, nbkg, m0, argpar, constraint_tf['mes'][0], constraint_tf['mes'][1])
nll = tf.neg(tf.reduce_sum(tf.log(likelihood)), name="nll")


variables = tf.all_variables()

grads = tf.gradients(nll, variables)

