bolkedebruin commented on issue #52753:
URL: https://github.com/apache/airflow/issues/52753#issuecomment-3109316570

   > > Or maybe even'isinstance(o, bool)' could work as np's bool is just an 
alias to the builtin bool?
   > 
   > If that's the case in both numpy's then that's probably best :D
   
   Unfotunately, I misread that. So in numpy < 1.24.0 `np.bool` (note the 
missing _) was an alias. `np.bool_` was a numpy scalar. In numpy 2 `np.bool` 
has become a numpy scalar.
   
   `(hasattr(np, "bool") && isinstance(o, np.bool) || isinstance(o, np.bool_)`
   
   Will work though.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to