question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IndexError: too many indices for array

See original GitHub issue

when I suppose my image to demo.py ,this happens To use the future default and silence this warning we advise to pass rcond=None, to keep using the old, explicitly pass rcond=-1. k,_,_,_ = np.linalg.lstsq(A,b) Traceback (most recent call last): File "demo.py", line 76, in <module> demo() File "demo.py", line 55, in demo input_img,lm_new,transform_params = Preprocess(img,lm,lm3D) File "C:\Users\Utente\Desktop\1x\Deep3DFaceReconstruction-master\preprocess_img.py", line 65, in Preprocess img_new,lm_new = process_img(img,lm,t,s) File "C:\Users\Utente\Desktop\1x\Deep3DFaceReconstruction-master\preprocess_img.py", line 46, in process_img img = img[:,:,::-1] IndexError: too many indices for array matteo.txt this is the txt input file .

why returns this error?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
JohnLebercommented, Oct 11, 2020

I had exactly this problem when running the demo. The problem went away when I updated the version of Pillow from 3.1.2 to 4.1.0. My version of numpy is 1.13.3.

Hope that helps someone.

0reactions
YuDengcommented, Nov 29, 2019

This is strange. Did you run the demo successfully with the image provided in the repository?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python IndexError: too many indices for array - STechies
While using a numpy array, you might come across an error IndexError: too many indices for array. This occurs when you are trying...
Read more >
IndexError: too many indices for array - Stack Overflow
'Too many indices' means you've given too many index values. You've given 2 values as you're expecting data to be a 2D array....
Read more >
'IndexError: too many indices for array' (Example) - Treehouse
Hi guys,. I am following the video but I get an error when inputting: study_minutes[(1, 0)]. I get: 'IndexError: too many indices for...
Read more >
Numpy array - IndexError: too many indices for array - Kaggle
I get the above index error while trying to slice my data. The data is an object array of word tokens and shape...
Read more >
PYTHON : IndexError: too many indices for array - YouTube
PYTHON : IndexError : too many indices for array [ Gift : Animated Search Engine : https://www.hows.tech/p/recommended.html ] PYTHON ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found