<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=text/html;charset=iso-8859-1 http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.23588"></HEAD>
<BODY style="PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 15px" 
id=MailContainerBody leftMargin=0 topMargin=0 CanvasTabStop="true" 
name="Compose message area">
<DIV><FONT size=4 face=Garamond>
<DIV><FONT size=4 face=Garamond>This was originally posted on SO (<A 
title="https://stackoverflow.com/questions/28853740/numpy-array-casting-ruled-not-safe CTRL + Click to follow link" 
href="">https://stackoverflow.com/questions/28853740/numpy-array-casting-ruled-not-safe</A>) 
and it was suggested it is probably a bug in numpy.take.</FONT></DIV>
<DIV><FONT size=4 face=Garamond></FONT> </DIV>
<DIV><FONT size=4 face=Garamond>Python 2.7.8 |Anaconda 2.1.0 (32-bit)| (default, 
Jul  2 2014, 15:13:35) [MSC v.1500 32 bit (Intel)] on win32<BR>Type 
"copyright", "credits" or "license()" for more information.</FONT></DIV>
<DIV><FONT size=4 face=Garamond><BR>>>> import numpy<BR>>>> 
numpy.__version__<BR>'1.9.2'</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=4 face=Garamond>>>> a = numpy.array([9, 7, 5, 4, 3, 1], 
dtype=numpy.uint32)<BR>>>> b = numpy.array([1, 3], 
dtype=numpy.uint32)<BR>>>> c = a.take(b)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=4 face=Garamond>Traceback (most recent call last):<BR>  
File "<pyshell#5>", line 1, in <module><BR>    c = 
a.take(b)<BR>TypeError: Cannot cast array data from dtype('uint32') to 
dtype('int32') according to the rule 'safe'</FONT></DIV>
<DIV><FONT size=4 face=Garamond></FONT> </DIV></FONT></DIV></BODY></HTML>