# Issues with Quickstart code example

**URL:** <https://openfhe.discourse.group/t/issues-with-quickstart-code-example/2327>\
**Category:** OpenFHE-NumPy\
**Created:** [June 8, 2026, 7:03pm UTC](https://openfhe.discourse.group/t/issues-with-quickstart-code-example/2327 "2026-06-08T19:03:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nbui](https://avatars.discourse-cdn.com/v4/letter/n/b2d939/32.png) [@nbui](https://openfhe.discourse.group/u/nbui)\
**Post date:** [June 8, 2026, 7:03pm UTC](https://openfhe.discourse.group/t/issues-with-quickstart-code-example/2327/1 "2026-06-08T19:03:22Z")

</div>

The quickstart example at [Quick Start — OpenFHE-Numpy 1.4.0.3 documentation](https://openfheorg.github.io/openfhe-numpy/html/example.html) does not run. There is a segfault on import caused by importing `openfhe_numpy` before `openfhe`. After switching the import statements, there is another error caused by `batch_size` being undefined. Looking at [examples/python/simple\_square\_matrix\_product.py](https://github.com/openfheorg/openfhe-numpy/blob/45857c644bc75321d54f6cdd49cc63f3f948b224/examples/python/simple_square_matrix_product.py), `batch_size` should be set to `ring_dim // 2`. After running with these changes, the result of the matrix multiplication is incorrect.

The OpenFHE-Numpy result of `A @ A` is:

```auto
[[7.00000000e+00 8.00000000e+00]
 [1.20000000e+01 2.92704262e-13]]

```

The plain numpy result of `A @ A`:

```auto
[[7 10]
 [15 22]]

```

Changing the mode from “zero” to “tile” when creating the OpenFhe-Numpy array fixed the issue. I have a fixed quickstart example on my Github. My Github username is `tsunami935`.

---

<div class="post-metadata">

**Author:** ![yuki](https://avatars.discourse-cdn.com/v4/letter/y/8edcca/32.png) [@yuki](https://openfhe.discourse.group/u/yuki)\
**Post date:** [June 25, 2026, 10:42am UTC](https://openfhe.discourse.group/t/issues-with-quickstart-code-example/2327/2 "2026-06-25T10:42:46Z")

</div>

The `README.md` is outdated. Please refer to the `examples/` folder for more detailed instructions on how to pack matrices. We will release a new version soon that supports more packing styles and updates the README accordingly.

Thank you for pointing this out.
