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:
vectornumpy.ndarray

Vector to flip.

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.

request_greeting(name)[source]#

Method that requests a greeting from the server.

Parameters:
namestr

Name of the “client”. For example, “Michael”.