There was no need to downgrade numpy. Anyways, try this:
x=np.asarray([True, False]); 
print(x); x= x.astype(int); print(x)
[ True False]
[1 0]

It should work. I’ve managed to reproduce your errors using this naïve test:
A)
x=True; np.where(x[0])
Traceback (most recent call last):

  File "<ipython-input-42-5a36c5ff4d25>", line 1, in <module>
    x=True; np.where(x[0])

TypeError: 'bool' object is not subscriptable

B)
x=True; np.astype(x)
Traceback (most recent call last):

  File "<ipython-input-43-de5d8813d34d>", line 1, in <module>
    x=True; np.astype(x)

AttributeError: module 'numpy' has no attribute 'astype'

I think there’s a problem with the type and size of your masks.
Could you please check the type and size of your masks?