Panjeh
Panjeh

Apr 22, 2021

·
1 min read

Check whether a numpy array is empty or not?

Numpy array has .size attribute. If it returns zero it means there are no elements in the array.

Suppose A is a numpy array.

if A.size == 0:
# then A is an empty array
Numpy
Array
Empty
Check
Size

--

--

More from Panjeh

Posting about Python and Laravel

Recommended from Medium

William Carpenter-Frank

William Carpenter-Frank

Starting my web development career

Maruf Hossain

Maruf Hossain

Array.isArray()

Sitharanishadini

Sitharanishadini

Remote Method Invocation

Abhishek

Abhishek

How to run Angular & React together in one UI app using single-spa

GeekyAnts

GeekyAnts

in

The NativeBase v2.0 Blog [ Deprecated ]

NativeBase Updates : March, 2019

Manoj Kumar S

Manoj Kumar S

Role Based Authentication using Vue.js 2

Jimmy Cheung

Jimmy Cheung

Beginner’s Guide to Boardgame.io

Mihir Jayavant

Mihir Jayavant

in

JavaScript in Plain English

Understanding Types in TypeScript

AboutHelpTermsPrivacy


Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Get unlimited access
Panjeh

Panjeh

407 Followers

Posting about Python and Laravel

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech