Sep-19-2022, 03:48 PM
I got this error of unsupported format character, As shown:
print line. I am guessing it would also call it on the second print line if it ever got there.
Help appreciated.
Respectfully,
LZ
Output:ValueError Traceback (most recent call last)
Input In [6], in <cell line: 6>()
4 pq = np.sum(p * np.log(p/q))
5 qp = np.sum(q * np.log(q/p))
----> 6 print('KL(P || Q) : %. pq)%.3f' % pq)
7 print('KL(Q || P) : %. pq)%.3f' % qp)
ValueError: unsupported format character ' ' (0x20) at index 15
I do not see it. Could it be a space before the colon? It calls it on the first print line. I am guessing it would also call it on the second print line if it ever got there.
Help appreciated.
Respectfully,
LZ