Hi,

I've also just noticed this oddity:

In [17]: np.can_cast('c', 'u1')
Out[17]: False

OK so far, but...

In [18]: np.can_cast('c', [('f1', 'u1')])
Out[18]: True

In [19]: np.can_cast('c', [('f1', 'u1')], 'safe')
Out[19]: True

In [20]: np.can_cast(np.ones(10, dtype='c'), [('f1', 'u1')])
Out[20]: True

I think this must be a bug.

In the other direction, it makes more sense to me:

In [24]: np.can_cast([('f1', 'u1')], 'c')
Out[24]: False

In [25]: np.can_cast([('f1', 'u1')], [('f1', 'u1')])
Out[25]: True

Best,

Matthew
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to