Cheat sheet

In the following tables, we summarize the concepts presented in this chapter. In addition, we also provide examples of how the same things are accomplished in NumPy and MATLAB. Use this to quickly look up common idioms when you are starting out with Breeze. Note that this only includes basic operations. We do not cover more advanced topics such as optimization and signal processing.

Creating matrices and vectors

Here, we examine the various ways of creating vectors and matrices in the three different systems:

Operation

Breeze

NumPy

MATLAB

Matrix creation (inline)

DenseMatrix((1.0, 2.0), (3.0, 4.0))

np.array([[1.0, 2.0], [3.0, 4.0]])

[1 2; 3 4]

Vector creation (inline)

DenseVector(1.0, 2.0, 3.0, 4.0)

np.array([1.0, ...

Get Scientific Computing with Scala now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.