how to count Nan occurrence in a ndarray?
Dear all, I have an ndarray with dimension of 4X62500. is there anyway I can count the number of missing value (NaN)? because I want to know how many observations are missing? Thanks for any idea, Chao -- *********************************************************************************** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment 712 - Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16 ************************************************************************************
The data is read from a .mat file. 2011/10/7 Chao YUE <chaoyuejoy@gmail.com>
Dear all,
I have an ndarray with dimension of 4X62500. is there anyway I can count the number of missing value (NaN)? because I want to know how many observations are missing?
Thanks for any idea,
Chao
--
*********************************************************************************** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment 712 - Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
************************************************************************************
-- *********************************************************************************** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment 712 - Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16 ************************************************************************************
You can use numpy.isnan(array).sum() -=- Olivier 2011/10/7 Chao YUE <chaoyuejoy@gmail.com>
The data is read from a .mat file.
2011/10/7 Chao YUE <chaoyuejoy@gmail.com>
Dear all,
I have an ndarray with dimension of 4X62500. is there anyway I can count the number of missing value (NaN)? because I want to know how many observations are missing?
Thanks for any idea,
Chao
--
*********************************************************************************** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment 712 - Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
************************************************************************************
--
*********************************************************************************** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment 712 - Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
************************************************************************************
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Thanks Olivier. Chao 2011/10/7 Olivier Delalleau <shish@keba.be>
You can use numpy.isnan(array).sum()
-=- Olivier
2011/10/7 Chao YUE <chaoyuejoy@gmail.com>
The data is read from a .mat file.
2011/10/7 Chao YUE <chaoyuejoy@gmail.com>
Dear all,
I have an ndarray with dimension of 4X62500. is there anyway I can count the number of missing value (NaN)? because I want to know how many observations are missing?
Thanks for any idea,
Chao
--
*********************************************************************************** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment 712 - Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
************************************************************************************
--
*********************************************************************************** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment 712 - Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
************************************************************************************
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
-- *********************************************************************************** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment 712 - Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16 ************************************************************************************
participants (2)
-
Chao YUE
-
Olivier Delalleau