jupyter / jupyter/notebook

only integer scalar arrays can be converted to a scalar index

Open
#4,429 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
13.3k
Forks
5.8k
Avg merge
6d 11h
Merged PRs (30d)
7

Description

I am doing image classification but, I got errors on images reshape , any one can help me how to do.
I have shape of array is :
`[test_img.shape,train_img.shape]((1, 32, 32, 3), (17034, 32, 32, 3))``
I want reshape array:

images=train_img.reshape(train_img[0]*5.545, 32,32)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-10-4284e9e28dcd> in <module>
----> 1 images=train_img.reshape(train_img[0]*5.545, 32,32)

TypeError: only integer scalar arrays can be converted to a scalar index


Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue provides only a notebook reshape call and traceback; it names no repository file, test, or Jupyter entry point. Start by determining whether the error is caused by the user's array operation or by Jupyter, then identify a minimal reproducible notebook case. Done requires a confirmed project defect with a specific affected component and regression test, or evidence that no repository change is needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, python
Domain
tooling
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.