Python Forum
Error: _vhstack_dispatcher() takes 1 positional argument but 9 were given
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error: _vhstack_dispatcher() takes 1 positional argument but 9 were given
#2
Please post error message and trace.

The documentation for vstack says it takes one tuple.

https://numpy.org/doc/stable/reference/g...stack.html

You are providing 9 arguments.

Let's count.
        (ptb / y[4] * y[5] / np.sqrt(y[5]**2 + y[6]**2) * function_deo(y[4], y[5], y[6], y[9], ptb, mqb, pes) - 1 / y[2]**2 + y[1]**2 / y[2],
         ptb / y[4] * y[6] / np.sqrt(y[5]**2 + y[6]**2) * function_deo(y[4], y[5], y[6], y[9], ptb, mqb, pes) - y[0] * y[1] / y[2]),  #1
                
        y[0],  #2

        y[1] / y[2],  #3
        
        -mqb * function_deo(y[4], y[5], y[6], y[9], ptb, mqb, pes),  #4
        
        y[6] * y[1] / y[2] - y[7],  #5
        
        -y[5] * 2.0 * y[1] / y[2] + y[6] * y[0] / y[2] - y[8] * 1.0 / y[2],  #6

        y[5] * (-2.0 / y[2]**3 + y[1]**2 / y[2]**2) + y[6] * (-y[0] * y[1]) / y[2] + y[8] * y[1] / y[2]**2,  #7
        
        0,  #8
        
        ptb / y[4]**2 * (np.sqrt(y[5]**2 + y[6]**2)) * function_deo(y[4], y[5], y[6], y[9], ptb, mqb, pes)  #9
        )
I count 9.

Number 1 is a doozy. Unlike the others, it is a tuple all by iteself, and it does this twice:
ptb / y[4] * y[5] / np.sqrt(y[5]**2 + y[6]**2) * function_deo(y[4], y[5], y[6], y[9], ptb, mqb, pes)
Reply


Messages In This Thread
RE: Error: _vhstack_dispatcher() takes 1 positional argument but 9 were given - by deanhystad - May-09-2022, 03:21 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  TypeError: Diagram.render() takes 1 positional argument but 2 were given sachin1361 0 379 Apr-23-2024, 06:39 AM
Last Post: sachin1361
  Strange argument count error rowan_bradley 3 870 Aug-06-2023, 10:58 AM
Last Post: rowan_bradley
  Error TypeError: output_type_handler() takes 2 positional arguments but 6 were given paulo79 1 2,130 Oct-17-2022, 06:29 PM
Last Post: paulo79
  What is positional argument self? Frankduc 22 6,367 Mar-06-2022, 01:18 AM
Last Post: Frankduc
  positional argument: 'self' mcmxl22 8 3,618 Dec-13-2021, 10:11 PM
Last Post: deanhystad
  TypeError: run_oracle_job() missing 1 required positional argument: 'connection_strin python_student 1 2,077 Aug-06-2021, 08:05 PM
Last Post: SheeppOSU
  int() argument Error.... but it's not :) LeoT 2 2,002 Feb-24-2021, 06:58 PM
Last Post: buran
  TypeError: sum() missing 1 required positional argument: 'num2' Insen 3 5,712 Jan-06-2021, 04:25 PM
Last Post: Insen
  TypeError: forward() missing 1 required positional argument: 'x' sveto4ka 4 12,584 Jun-17-2020, 07:25 PM
Last Post: sveto4ka
  missing 1 required positional argument: 'self' yasser 7 11,997 Jun-07-2020, 06:48 AM
Last Post: ndc85430

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020