Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c25f0f3

Browse files
committed
add nbytes
1 parent 38593e9 commit c25f0f3

File tree

2 files changed

+437
-348
lines changed

2 files changed

+437
-348
lines changed

‎2. Inspect an Array.ipynb

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,31 @@
196196
"source": [
197197
"print(arr.itemsize)"
198198
]
199+
},
200+
{
201+
"cell_type": "markdown",
202+
"metadata": {},
203+
"source": [
204+
"### inspect the memory size of an array (in byte)"
205+
]
206+
},
207+
{
208+
"cell_type": "code",
209+
"execution_count": 42,
210+
"metadata": {},
211+
"outputs": [
212+
{
213+
"name": "stdout",
214+
"output_type": "stream",
215+
"text": [
216+
"48\n"
217+
]
218+
}
219+
],
220+
"source": [
221+
"# arr.nbytes = arr.size * arr.itemsize\n",
222+
"print(arr.nbytes)"
223+
]
199224
}
200225
],
201226
"metadata": {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /