From: 
Subject: Debian changes

The Debian packaging of numpy-rms is maintained in git, using a workflow
similar to the one described in dgit-maint-merge(7).
The Debian delta is represented by this one combined patch; there isn't a
patch queue that can be represented as a quilt series.

A detailed breakdown of the changes is available from their canonical
representation -- git commits in the packaging repository.
For example, to see the changes made by the Debian maintainer in the first
upload of upstream version 1.2.3, you could use:

    % git clone https://git.dgit.debian.org/numpy-rms
    % cd numpy-rms
    % git log --oneline 1.2.3..debian/1.2.3-1 -- . ':!debian'

(If you have dgit, use `dgit clone numpy-rms`, rather than plain `git clone`.)

We don't use debian/source/options single-debian-patch because it has bugs.
Therefore, NMUs etc. may nevertheless have made additional patches.

---

diff --git a/numpy_rms/_rms.c b/numpy_rms/_rms.c
index 0e2046a..98fd17f 100644
--- a/numpy_rms/_rms.c
+++ b/numpy_rms/_rms.c
@@ -9,7 +9,7 @@ void rms_scalar(const float *a, int window_size, float *rms_output, size_t outpu
 void rms(const float *a, int window_size, float *rms_output, size_t output_length) {
     #if defined(__x86_64__) || defined(_M_X64)
         rms_avx2(a, window_size, rms_output, output_length);
-    #elif defined(__arm__) || defined(__aarch64__)
+    #elif defined(__aarch64__) || defined(__ARM_NEON) || defined(__ARM_NEON__)
         rms_neon(a, window_size, rms_output, output_length);
     #else
         rms_scalar(a, window_size, rms_output, output_length);
@@ -65,7 +65,7 @@ void rms_avx2(const float *a, int window_size, float *rms_output, size_t output_
 }
 
 // NEON implementation
-#elif defined(__arm__) || defined(__aarch64__)
+#elif defined(__aarch64__) || defined(__ARM_NEON) || defined(__ARM_NEON__)
 #include <arm_neon.h>
 
 // NB! The length of a must be >= output_length * window_size
diff --git a/tests/test_rms.py b/tests/test_rms.py
index 2ca5b72..bec0f77 100644
--- a/tests/test_rms.py
+++ b/tests/test_rms.py
@@ -1,11 +1,15 @@
 import numpy as np
 import pytest
-from numpy.testing import assert_array_almost_equal
+from numpy.testing import assert_allclose
 
 import numpy_rms
 from numpy_rms.fallback import rms_numpy
 
 
+def assert_rms_close(actual, desired):
+    assert_allclose(actual, desired, rtol=1e-6, atol=1e-6)
+
+
 def test_rms_large_array(benchmark):
     arr = np.arange(100_000_000, dtype=np.float32)
     rms = benchmark(numpy_rms.rms, arr, window_size=5000)
@@ -21,7 +25,7 @@ def test_rms_2d_mono():
     assert rms.shape == (1, 10)
     assert rms_numpy_fallback.shape == (1, 10)
     assert rms[0, 0] == 1.0
-    assert_array_almost_equal(rms, rms_numpy_fallback)
+    assert_rms_close(rms, rms_numpy_fallback)
 
 
 def test_rms_2d_stereo():
@@ -33,7 +37,7 @@ def test_rms_2d_stereo():
     assert rms_numpy_fallback.shape == (2, 10)
     assert rms[0, 0] == 1.0
     assert rms[1, 1] == 2.0
-    assert_array_almost_equal(rms, rms_numpy_fallback)
+    assert_rms_close(rms, rms_numpy_fallback)
 
 
 def test_rms_numpy_fallback_large_array(benchmark):
@@ -49,7 +53,7 @@ def test_not_divisible_by_window_size():
     rms = numpy_rms.rms(arr, window_size=16)
     rms_numpy_fallback = rms_numpy(arr, window_size=16)
     assert rms.shape == rms_numpy_fallback.shape
-    assert_array_almost_equal(rms, rms_numpy_fallback)
+    assert_rms_close(rms, rms_numpy_fallback)
 
 
 def test_rms_window_size_not_divisible_by_8():
@@ -57,7 +61,7 @@ def test_rms_window_size_not_divisible_by_8():
     rms = numpy_rms.rms(arr, window_size=13)
     rms_numpy_fallback = rms_numpy(arr, window_size=13)
     assert rms.shape == rms_numpy_fallback.shape
-    assert_array_almost_equal(rms, rms_numpy_fallback)
+    assert_rms_close(rms, rms_numpy_fallback)
 
 
 def test_rms_window_size_smaller_than_8():
@@ -65,7 +69,7 @@ def test_rms_window_size_smaller_than_8():
     rms = numpy_rms.rms(arr, window_size=4)
     rms_numpy_fallback = rms_numpy(arr, window_size=4)
     assert rms.shape == rms_numpy_fallback.shape
-    assert_array_almost_equal(rms, rms_numpy_fallback)
+    assert_rms_close(rms, rms_numpy_fallback)
 
 
 def test_rms_window_size_none():
