So I'm trying to make the 4th column in this one-dimensional array of the boolean data type. I've read that either '?' or 'b' are supposed to work, but neither do. The error I keep getting is shown below after the code I'm using:
import numpy as np
x = np.array([(1, 2., 'Hello', True), dtype=[('int', 'i4'),('float', 'f4'), ('string', 'S10'),('bool','?')])
x[0][3] != x[0][3]
print(x[0][3])
File "main.py", line 3
x = np.array([(1, 2., 'Hello', True), dtype=[('int', 'i4'),('float', 'f4'), ('string', 'S1'),('bool','?')])
^
SyntaxError: invalid syntax