Allow scalars of custom-dtype objects as arguments (suggested by Bogdan Opanchuk