Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Too many indexers #10

Open
Saadi4469 opened this issue Nov 4, 2020 · 6 comments
Open

Too many indexers #10

Saadi4469 opened this issue Nov 4, 2020 · 6 comments

Comments

@Saadi4469
Copy link

In line 271 of the code vic_auto.py, I am getting the following error:

IndexingError: Too many indexers
Please advise a solution to this!
Thank you
Just to show the print of dfm2 after line 270, I get the following print:

           0         1         2    3  ...         2    3    4     new
0    0.062420  0.689541  0.248040  0.0  ...  0.248040  0.0  0.0  266566
1    0.000000  0.285827  0.714173  0.0  ...  0.714173  0.0  0.0  266568
2    0.004425  0.516267  0.479309  0.0  ...  0.479309  0.0  0.0  267494
3    0.000000  0.491338  0.508662  0.0  ...  0.508662  0.0  0.0  267495
4    0.000000  0.649343  0.350657  0.0  ...  0.350657  0.0  0.0  267496
..        ...       ...       ...  ...  ...       ...  ...  ...     ...
251  0.000000  0.986212  0.013788  0.0  ...  0.013788  0.0  0.0  286058
252  0.000000  1.000000  0.000000  0.0  ...  0.000000  0.0  0.0  286980
253  0.000000  1.000000  0.000000  0.0  ...  0.000000  0.0  0.0  286981
254  0.000000  1.000000  0.000000  0.0  ...  0.000000  0.0  0.0  286982
255  0.000000  1.000000  0.000000  0.0  ...  0.000000  0.0  0.0  287909
@LSRathore
Copy link
Owner

Can you remove line 271 and try if it works?

@Saadi4469
Copy link
Author

Sir then I get the following error at line:
dfm2.index=dfm2.new

raise ValueError("Index data must be 1-dimensional")

ValueError: Index data must be 1-dimensional

@LSRathore
Copy link
Owner

Can you send me a text file containing all values of dfm2 (run the vic-auto up to line 270 only)?

@Saadi4469
Copy link
Author

dfm2.txt
Here you go sir!
Thank you!

@LSRathore
Copy link
Owner

Removing line 271 runs perfect. Or you can just manually cut the last column i.e. new from the file and insert it in the first column place i.e. index using excel. That is your elevation band file.

@Saadi4469
Copy link
Author

Sir, that worked brilliant and thank you for your constant guidance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants