diff --git a/docs/source/classical_coding.ipynb b/docs/source/classical_coding.ipynb index ef189ff..81690a4 100644 --- a/docs/source/classical_coding.ipynb +++ b/docs/source/classical_coding.ipynb @@ -11,7 +11,7 @@ }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 6, "metadata": {}, "outputs": [ { @@ -32,6 +32,7 @@ "source": [ "import numpy as np\n", "import ldpc.codes\n", + "import ldpc.code_util\n", "n=5 #specifies the lenght of the repetition code\n", "H=ldpc.codes.rep_code(n) #returns the repetition code parity check matrix\n", "print(H)" @@ -46,7 +47,7 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 7, "metadata": {}, "outputs": [ { @@ -74,7 +75,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 8, "metadata": {}, "outputs": [ { @@ -103,7 +104,7 @@ }, { "cell_type": "code", - "execution_count": 37, + "execution_count": 9, "metadata": {}, "outputs": [ { @@ -130,7 +131,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 10, "metadata": {}, "outputs": [ { @@ -157,14 +158,14 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 11, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Code distance estimate, d <= 3 (no. codewords sampled: 394837)\n" + "Code distance estimate, d <= 3 (no. codewords sampled: 390178)\n" ] } ], @@ -182,7 +183,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 12, "metadata": {}, "outputs": [ { @@ -209,7 +210,7 @@ }, { "cell_type": "code", - "execution_count": 38, + "execution_count": 13, "metadata": {}, "outputs": [ { @@ -248,7 +249,7 @@ }, { "cell_type": "code", - "execution_count": 39, + "execution_count": 14, "metadata": {}, "outputs": [ { @@ -260,7 +261,7 @@ " [0, 0, 1, 1, 0, 0, 1]], dtype=uint8)" ] }, - "execution_count": 39, + "execution_count": 14, "metadata": {}, "output_type": "execute_result" } @@ -284,7 +285,7 @@ }, { "cell_type": "code", - "execution_count": 40, + "execution_count": 15, "metadata": {}, "outputs": [ { @@ -295,7 +296,7 @@ " [0, 0, 0, 0]], dtype=uint8)" ] }, - "execution_count": 40, + "execution_count": 15, "metadata": {}, "output_type": "execute_result" } @@ -324,7 +325,7 @@ }, { "cell_type": "code", - "execution_count": 41, + "execution_count": 16, "metadata": {}, "outputs": [ { @@ -333,7 +334,7 @@ "array([1, 0, 0, 0, 0, 1, 1])" ] }, - "execution_count": 41, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } @@ -354,7 +355,7 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": 17, "metadata": {}, "outputs": [ { @@ -363,7 +364,7 @@ "array([0, 0, 0])" ] }, - "execution_count": 42, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } diff --git a/setup.py b/setup.py index 91bce73..7cd8fd3 100755 --- a/setup.py +++ b/setup.py @@ -92,9 +92,14 @@ def generate_cython_stub_file(pyx_filepath: str, output_filepath: str) -> None: ## BUILD +# if sys.platform == "darwin": +# os.environ["CC"] = "gcc-11" +# os.environ["CXX"] = "g++-11" + if sys.platform == "darwin": - os.environ["CC"] = "gcc-11" - os.environ["CXX"] = "g++-11" + os.environ["CC"] = "clang" + os.environ["CXX"] = "clang++" + if sys.platform == "win32": compile_flags = ["/Ox", "/std:c++20"]