Python gRPC client module#
Python implementation of the gRPC API Eigen Example client.
- class ansys.eigen.python.grpc.client.DemoGRPCClient(ip='127.0.0.1', port=50051, timeout=1, test=None)[source]#
Bases:
object
Provides the API Eigen Example client class for interacting via gRPC.
- add_matrices(*args)[source]#
Add numpy.ndarray matrices using the Eigen library on the server side.
- Returns:
numpy.ndarray
Resulting numpy.ndarray of the matrices addition.
- add_vectors(*args)[source]#
Add numpy.ndarray vectors using the Eigen library on the server side.
- Returns:
numpy.ndarray
Result of the given numpy.ndarrays.
- flip_vector(vector)[source]#
Flip the position of a numpy.ndarray vector such that [A, B, C, D] –> [D, C, B, A].
- Parameters:
- vector
numpy.ndarray
Vector to flip.
- vector
- Returns:
numpy.ndarray
Flipped vector.
- multiply_matrices(*args)[source]#
Multiply numpy.ndarray matrices using the Eigen library on the server side.
- Returns:
numpy.ndarray
Resulting numpy.ndarray of the matrices’ multiplication.
- multiply_vectors(*args)[source]#
Multiply numpy.ndarray vectors using the Eigen library on the server side.
- Returns:
numpy.ndarray
Result of the multiplication of numpy.ndarray vectors. Despite returning a numpy.ndarray, the result only contains one value because it is a dot product.