← Back
Editing: _remove_redundancy.cpython-311.pyc
� d�cOI � �r � d Z ddlZddlmZ ddlmZ ddlZddlm Z d� Z d� Zd� Zd � Z dd �Zd� Zd� Zdd�ZdS )zn Routines for removing redundant (linearly dependent) equations from linear programming equality constraints. � N)�svd)� interp_decomp��dtrsmc � � d}t j t | � � |k � d�� � � � � � � S )a� Counts the number of nonzeros in each row of input array A. Nonzeros are defined as any element with absolute value greater than tol = 1e-13. This value should probably be an input to the function. Parameters ---------- A : 2-D array An array representing a matrix Returns ------- rowcount : 1-D array Number of nonzeros in each row of A g�vIh�%<=� ��axis)�np�array�abs�sum�flatten)�A�tols �C/usr/lib/python3/dist-packages/scipy/optimize/_remove_redundancy.py� _row_countr s@ � �"