Title: Failing test · Issue #242 · python-acoustics/python-acoustics · GitHub
Open Graph Title: Failing test · Issue #242 · python-acoustics/python-acoustics
X Title: Failing test · Issue #242 · python-acoustics/python-acoustics
Description: Failing test with nixpkgs at d10a0143d0cbf3777c0e386c8dac635b59754cf2. /build/acoustics-0.2.3/tests /build/acoustics-0.2.3 ============================= test session starts ============================== platform linux -- Python 3.7.6, p...
Open Graph Description: Failing test with nixpkgs at d10a0143d0cbf3777c0e386c8dac635b59754cf2. /build/acoustics-0.2.3/tests /build/acoustics-0.2.3 ============================= test session starts ========================...
X Description: Failing test with nixpkgs at d10a0143d0cbf3777c0e386c8dac635b59754cf2. /build/acoustics-0.2.3/tests /build/acoustics-0.2.3 ============================= test session starts ========================...
Opengraph URL: https://github.com/python-acoustics/python-acoustics/issues/242
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Failing test","articleBody":"Failing test with nixpkgs at d10a0143d0cbf3777c0e386c8dac635b59754cf2.\r\n\r\n```\r\n/build/acoustics-0.2.3/tests /build/acoustics-0.2.3\r\n============================= test session starts ==============================\r\nplatform linux -- Python 3.7.6, pytest-5.3.5, py-1.8.1, pluggy-0.13.1\r\nrootdir: /build/acoustics-0.2.3\r\ncollected 504 items \r\n\r\ntest__signal.py ........................................................ [ 11%]\r\n........................................................................ [ 25%] \r\n............................... [ 31%] \r\ntest_aio.py ............................................................ [ 43%]\r\n................................................................ [ 56%] \r\ntest_atmosphere.py .. [ 56%]\r\ntest_bands.py ................ [ 59%]\r\ntest_building.py ......... [ 61%]\r\ntest_cepstrum.py .. [ 61%]\r\ntest_criterion.py ................... [ 65%]\r\ntest_decibel.py ...... [ 66%]\r\ntest_descriptors.py .......... [ 68%]\r\ntest_directivity.py ..... [ 69%]\r\ntest_generator.py .............................. [ 75%]\r\ntest_imaging.py ..... [ 76%]\r\ntest_octave.py .. [ 77%]\r\ntest_power.py ... [ 77%]\r\ntest_room.py ............................. [ 83%]\r\ntest_signal.py ................................................... [ 93%]\r\ntest_utils.py .............. [ 96%]\r\ntest_weighting.py ...... [ 97%]\r\nstandards/test_iec_61672_1_2013.py .......... [ 99%]\r\nstandards/test_iso_1996_2_2007.py F [ 99%]\r\nstandards/test_iso_tr_25417_2007.py . [100%]\r\n\r\n=================================== FAILURES ===================================\r\n________________________________ test_tonality _________________________________\r\n\r\n def test_tonality():\r\n \r\n duration = 60.0\r\n fs = 10025.0\r\n samples = int(fs * duration)\r\n times = np.arange(samples) / fs\r\n \r\n signal = Signal(np.sin(2.0 * np.pi * 1000.0 * times), fs)\r\n \r\n tonality = Tonality(signal, signal.fs)\r\n \r\n # Test methods before analysis\r\n tonality.spectrum\r\n tonality.plot_spectrum()\r\n \r\n tonality.frequency_resolution\r\n tonality.effective_analysis_bandwidth\r\n \r\n # No values yet, cannot print overview.\r\n with pytest.raises(ValueError):\r\n print(tonality.overview())\r\n tonality.results_as_dataframe()\r\n \r\n assert len(list(tonality.noise_pauses)) == 0\r\n assert len(list(tonality.tones)) == 0\r\n assert len(list(tonality.critical_bands)) == 0\r\n \r\n # Perform analysis\r\n\u003e tonality.determine_noise_pauses().analyse()\r\n\r\nstandards/test_iso_1996_2_2007.py:36:\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n/nix/store/ndi5w75n7cvgfchh5y1icykk6jhvhnkq-python3.7-acoustics-0.2.3/lib/python3.7/site-packages/acoustics/standards/iso_1996_2_2007.py:321: in analyse\r\n self._determine_tones()\r\n/nix/store/ndi5w75n7cvgfchh5y1icykk6jhvhnkq-python3.7-acoustics-0.2.3/lib/python3.7/site-packages/acoustics/standards/iso_1996_2_2007.py:295: in _determine_tones\r\n self.force_bandwidth_criterion,\r\n/nix/store/ndi5w75n7cvgfchh5y1icykk6jhvhnkq-python3.7-acoustics-0.2.3/lib/python3.7/site-packages/acoustics/standards/iso_1996_2_2007.py:658: in determine_tone_lines\r\n indices_3db = np.nonzero(levels.iloc[npr] \u003e= levels.iloc[npr].max() - TONE_BANDWIDTH_CRITERION_DB)[0]\r\n\u003c__array_function__ internals\u003e:6: in nonzero\r\n ???\r\n/nix/store/mg6agzzf88rxhsc5j3lhgv68sdwvc4hd-python3.7-numpy-1.18.1/lib/python3.7/site-packages/numpy/core/fromnumeric.py:1896: in nonzero\r\n return _wrapfunc(a, 'nonzero')\r\n/nix/store/mg6agzzf88rxhsc5j3lhgv68sdwvc4hd-python3.7-numpy-1.18.1/lib/python3.7/site-packages/numpy/core/fromnumeric.py:58: in _wrapfunc\r\n return _wrapit(obj, method, *args, **kwds)\r\n/nix/store/mg6agzzf88rxhsc5j3lhgv68sdwvc4hd-python3.7-numpy-1.18.1/lib/python3.7/site-packages/numpy/core/fromnumeric.py:51: in _wrapit\r\n result = wrap(result)\r\n/nix/store/sdvrxnwmjbs14p27racmgidjkwg5ypw3-python3.7-pandas-1.0.1/lib/python3.7/site-packages/pandas/core/generic.py:1918: in __array_wrap__\r\n return self._constructor(result, **d).__finalize__(self)\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\nself = \u003c[AttributeError(\"'Series' object has no attribute '_name'\") raised in repr()] Series object at 0x7fffe072d850\u003e\r\ndata = array([[1, 2]])\r\nindex = Float64Index([4.0, 5.0, 6.0, 7.0], dtype='float64'), dtype = None\r\nname = None, copy = False, fastpath = False\r\n\r\n def __init__(\r\n self, data=None, index=None, dtype=None, name=None, copy=False, fastpath=False\r\n ):\r\n \r\n # we are called internally, so short-circuit\r\n if fastpath:\r\n \r\n # data is an ndarray, index is defined\r\n if not isinstance(data, SingleBlockManager):\r\n data = SingleBlockManager(data, index, fastpath=True)\r\n if copy:\r\n data = data.copy()\r\n if index is None:\r\n index = data.index\r\n \r\n else:\r\n \r\n name = ibase.maybe_extract_name(name, data, type(self))\r\n \r\n if is_empty_data(data) and dtype is None:\r\n # gh-17261\r\n warnings.warn(\r\n \"The default dtype for empty Series will be 'object' instead \"\r\n \"of 'float64' in a future version. Specify a dtype explicitly \"\r\n \"to silence this warning.\",\r\n DeprecationWarning,\r\n stacklevel=2,\r\n )\r\n # uncomment the line below when removing the DeprecationWarning\r\n # dtype = np.dtype(object)\r\n \r\n if index is not None:\r\n index = ensure_index(index)\r\n \r\n if data is None:\r\n data = {}\r\n if dtype is not None:\r\n dtype = self._validate_dtype(dtype)\r\n \r\n if isinstance(data, MultiIndex):\r\n raise NotImplementedError(\r\n \"initializing a Series from a MultiIndex is not supported\"\r\n )\r\n elif isinstance(data, Index):\r\n \r\n if dtype is not None:\r\n # astype copies\r\n data = data.astype(dtype)\r\n else:\r\n # need to copy to avoid aliasing issues\r\n data = data._values.copy()\r\n if isinstance(data, ABCDatetimeIndex) and data.tz is not None:\r\n # GH#24096 need copy to be deep for datetime64tz case\r\n # TODO: See if we can avoid these copies\r\n data = data._values.copy(deep=True)\r\n copy = False\r\n \r\n elif isinstance(data, np.ndarray):\r\n if len(data.dtype):\r\n # GH#13296 we are dealing with a compound dtype, which\r\n # should be treated as 2D\r\n raise ValueError(\r\n \"Cannot construct a Series from an ndarray with \"\r\n \"compound dtype. Use DataFrame instead.\"\r\n )\r\n pass\r\n elif isinstance(data, ABCSeries):\r\n if index is None:\r\n index = data.index\r\n else:\r\n data = data.reindex(index, copy=copy)\r\n data = data._data\r\n elif is_dict_like(data):\r\n data, index = self._init_dict(data, index, dtype)\r\n dtype = None\r\n copy = False\r\n elif isinstance(data, SingleBlockManager):\r\n if index is None:\r\n index = data.index\r\n elif not data.index.equals(index) or copy:\r\n # GH#19275 SingleBlockManager input should only be called\r\n # internally\r\n raise AssertionError(\r\n \"Cannot pass both SingleBlockManager \"\r\n \"`data` argument and a different \"\r\n \"`index` argument. `copy` must be False.\"\r\n )\r\n \r\n elif is_extension_array_dtype(data):\r\n pass\r\n elif isinstance(data, (set, frozenset)):\r\n raise TypeError(f\"'{type(data).__name__}' type is unordered\")\r\n elif isinstance(data, ABCSparseArray):\r\n # handle sparse passed here (and force conversion)\r\n data = data.to_dense()\r\n else:\r\n data = com.maybe_iterable_to_list(data)\r\n \r\n if index is None:\r\n if not is_list_like(data):\r\n data = [data]\r\n index = ibase.default_index(len(data))\r\n elif is_list_like(data):\r\n \r\n # a scalar numpy array is list-like but doesn't\r\n # have a proper length\r\n try:\r\n if len(index) != len(data):\r\n raise ValueError(\r\n\u003e f\"Length of passed values is {len(data)}, \"\r\n f\"index implies {len(index)}.\"\r\n )\r\nE ValueError: Length of passed values is 1, index implies 4.\r\n\r\n/nix/store/sdvrxnwmjbs14p27racmgidjkwg5ypw3-python3.7-pandas-1.0.1/lib/python3.7/site-packages/pandas/core/series.py:292: ValueError\r\n=============================== warnings summary ===============================\r\nstandards/test_iec_61672_1_2013.py:30\r\n /build/acoustics-0.2.3/tests/standards/test_iec_61672_1_2013.py:30: DeprecationWarning: invalid escape sequence \\c\r\n \"\"\"\r\n\r\n-- Docs: https://docs.pytest.org/en/latest/warnings.html\r\n================== 1 failed, 503 passed, 1 warning in 17.45s ===================\r\nbuilder for '/nix/store/10sbf7k08xjbq84jc2qvymly3gvs1q1s-python3.7-acoustics-0.2.3.drv' failed with exit code 1\r\nerror: build of '/nix/store/10sbf7k08xjbq84jc2qvymly3gvs1q1s-python3.7-acoustics-0.2.3.drv' failed\r\n```","author":{"url":"https://github.com/FRidh","@type":"Person","name":"FRidh"},"datePublished":"2020-02-21T17:33:47.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/242/python-acoustics/issues/242"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6fc6024d-ae9c-74be-4202-f0217af21b8e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C4F0:A4469:10C952:163F5E:698E894E |
| html-safe-nonce | e82235f5cc051584ecbfc65579a89f66041b1bc1cab295031483ed7ca833a210 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNEYwOkE0NDY5OjEwQzk1MjoxNjNGNUU6Njk4RTg5NEUiLCJ2aXNpdG9yX2lkIjoiNTA0ODYyODkzMzM1ODA4MzM0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 88da27f369e6e354527c77d23a8ca6c559d970574201aa1443369cbc06bf6915 |
| hovercard-subject-tag | issue:569089162 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-acoustics/python-acoustics/242/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d03b0ea697bc027e8f2f2024a4276c242d181d23a74e2702221d69ce7968c8f1/python-acoustics/python-acoustics/issues/242 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d03b0ea697bc027e8f2f2024a4276c242d181d23a74e2702221d69ce7968c8f1/python-acoustics/python-acoustics/issues/242 |
| og:image:alt | Failing test with nixpkgs at d10a0143d0cbf3777c0e386c8dac635b59754cf2. /build/acoustics-0.2.3/tests /build/acoustics-0.2.3 ============================= test session starts ========================... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | FRidh |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb2828a801ee6b7be618f3ac76fbf55def35bbc30f053a9c41bf90210b8b72ba |
| turbo-cache-control | no-preview |
| go-import | github.com/python-acoustics/python-acoustics git https://github.com/python-acoustics/python-acoustics.git |
| octolytics-dimension-user_id | 3644840 |
| octolytics-dimension-user_login | python-acoustics |
| octolytics-dimension-repository_id | 14710112 |
| octolytics-dimension-repository_nwo | python-acoustics/python-acoustics |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14710112 |
| octolytics-dimension-repository_network_root_nwo | python-acoustics/python-acoustics |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f7a12861f7011eecb14bcc4388a767d829a52dfc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width