On Thu, Mar 24, 2011 at 1:12 PM, Sachin Kumar Sharma <ssharm...@slb.com>wrote:

>  BB,
>
>
>
> In a numpy array of m x n size, I would like to delete few rows when a
> given element in that row is ‘nan’ or say any other value.
>
>
>
> For e.g.  as in example given below, if I wish to delete a row when the 3
> rd element of row is zero, or if 3rd, 4th, 5th element are zero or either
> of 3rd, 4th and 5th element is zero.
>
> array([[ 1900. ,     nan,     nan,     nan,     nan,     nan],
>
>        [ 1900.5,     nan,     nan,     nan,     nan,     nan],
>
>        [ 1901. ,     nan,     nan,     nan,     nan,     nan],
>
>        ...,
>
>        [ 6724. ,     nan,     nan,     nan,     nan,     nan],
>
>        [ 6724.5,     nan,     nan,     nan,     nan,     nan],
>
>        [ 6725. ,     nan,     nan,     nan,     nan,     nan]])
>
> Cheers
>
>
>
> Sachin* *
>
> *************************************************************************
> Sachin Kumar Sharma*
>
> Senior Geomodeler **
>
>
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
> I think u can use  numpy.loadtext command
http://docs.scipy.org/doc/numpy/reference/generated/numpy.loadtxt.html


-- 
DILEEPKUMAR. R
J R F, IIT DELHI
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to