
    `i                     4    d dl Z d Zd Zd Zd Zd ZddZdS )	    Nc                 2    | t          j        d          S | S )Nr   r   )cupyzerosargs    v/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/cupyx/scipy/signal/_lti_conversion.py_none_to_empty_2dr
      s    
{z&!!!
    c                 2    | t          j        |           S d S N)r   
atleast_2dr   s    r	   _atleast_2d_or_noner      s    
s### r   c                     | | j         S dS )N)NN)shape)Ms    r	   _shape_or_noner      s    }w{r   c                      | D ]}||c S 	d S r    )argsr   s     r	   _choice_not_noner      s.      ?JJJ  r   c                 x    | j         dk    rt          j        |          S | j         |k    rt          d          | S )Nr   z*The input arrays have incompatible shapes.)r   r   r   
ValueError)r   r   s     r	   _restorer      s@    w&z%   7eIJJJr   c                 2   t          t          | |||f          \  } }}}t          |           \  }}t          |          \  }}t          |          \  }}	t          |          \  }
}t          |||	          }t          ||          }t          ||
          }|||t	          d          t          t
          | |||f          \  } }}}t          | ||f          } t          |||f          }t          |||f          }t          |||f          }| |||fS )a  Check state-space matrices and ensure they are 2-D.

    If enough information on the system is provided, that is, enough
    properly-shaped arrays are passed to the function, the missing ones
    are built from this information, ensuring the correct number of
    rows and columns. Otherwise a ValueError is raised.

    Parameters
    ----------
    A, B, C, D : array_like, optional
        State-space matrices. All of them are None (missing) by default.
        See `ss2tf` for format.

    Returns
    -------
    A, B, C, D : array
        Properly shaped state-space matrices.

    Raises
    ------
    ValueError
        If not enough information on the system was provided.

    Nz%Not enough information on the system.)mapr   r   r   r   r
   r   )ABCDMANAMBNBMCNCMDNDpqrs                  r	   abcd_normalizer,   &   s-   2 (1aA,77JAq!QAFBAFBAFBAFBR$$AR  AR  AyAI@AAA&Aq!55JAq!QQFAQFAQFAQFAaA:r   )NNNN)r   r
   r   r   r   r   r,   r   r   r	   <module>r-      sw      $ $ $
      , , , , , ,r   