From 5c919edec0c184972bc0d5d488cd2cb50f743a6d Mon Sep 17 00:00:00 2001 From: David Graham Date: Sun, 15 Jun 2025 19:02:03 -0400 Subject: [PATCH 1/8] add numpy to dependencies --- pyproject.toml | 3 ++ uv.lock | 137 ++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 139 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 00836d0..bd31160 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,6 +17,9 @@ classifiers = [ "Programming Language :: Python :: 3.13", "Private :: Do Not Upload", ] +dependencies = [ + "numpy>=2.2.6", +] [dependency-groups] diff --git a/uv.lock b/uv.lock index 9dee61e..0b4fa46 100644 --- a/uv.lock +++ b/uv.lock @@ -1,6 +1,10 @@ version = 1 revision = 2 requires-python = ">=3.10" +resolution-markers = [ + "python_full_version >= '3.11'", + "python_full_version < '3.11'", +] [[package]] name = "cfgv" @@ -34,7 +38,7 @@ name = "exceptiongroup" version = "1.3.0" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "typing-extensions", marker = "python_full_version < '3.13'" }, + { name = "typing-extensions", marker = "python_full_version < '3.11'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/0b/9f/a65090624ecf468cdca03533906e7c69ed7588582240cfe7cc9e770b50eb/exceptiongroup-1.3.0.tar.gz", hash = "sha256:b241f5885f560bc56a59ee63ca4c6a8bfa46ae4ad651af316d4e81817bb9fd88", size = 29749, upload-time = "2025-05-10T17:42:51.123Z" } wheels = [ @@ -81,6 +85,10 @@ wheels = [ name = "libseis" version = "0.0.2" source = { editable = "." } +dependencies = [ + { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, + { name = "numpy", version = "2.3.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, +] [package.dev-dependencies] build = [ @@ -95,6 +103,7 @@ dev = [ ] [package.metadata] +requires-dist = [{ name = "numpy", specifier = ">=2.2.6" }] [package.metadata.requires-dev] build = [{ name = "pybind11", specifier = ">=2.13.6" }] @@ -115,6 +124,132 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/d2/1d/1b658dbd2b9fa9c4c9f32accbfc0205d532c8c6194dc0f2a4c0428e7128a/nodeenv-1.9.1-py2.py3-none-any.whl", hash = "sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9", size = 22314, upload-time = "2024-06-04T18:44:08.352Z" }, ] +[[package]] +name = "numpy" +version = "2.2.6" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.11'", +] +sdist = { url = "https://files.pythonhosted.org/packages/76/21/7d2a95e4bba9dc13d043ee156a356c0a8f0c6309dff6b21b4d71a073b8a8/numpy-2.2.6.tar.gz", hash = "sha256:e29554e2bef54a90aa5cc07da6ce955accb83f21ab5de01a62c8478897b264fd", size = 20276440, upload-time = "2025-05-17T22:38:04.611Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9a/3e/ed6db5be21ce87955c0cbd3009f2803f59fa08df21b5df06862e2d8e2bdd/numpy-2.2.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b412caa66f72040e6d268491a59f2c43bf03eb6c96dd8f0307829feb7fa2b6fb", size = 21165245, upload-time = "2025-05-17T21:27:58.555Z" }, + { url = "https://files.pythonhosted.org/packages/22/c2/4b9221495b2a132cc9d2eb862e21d42a009f5a60e45fc44b00118c174bff/numpy-2.2.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8e41fd67c52b86603a91c1a505ebaef50b3314de0213461c7a6e99c9a3beff90", size = 14360048, upload-time = "2025-05-17T21:28:21.406Z" }, + { url = "https://files.pythonhosted.org/packages/fd/77/dc2fcfc66943c6410e2bf598062f5959372735ffda175b39906d54f02349/numpy-2.2.6-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:37e990a01ae6ec7fe7fa1c26c55ecb672dd98b19c3d0e1d1f326fa13cb38d163", size = 5340542, upload-time = "2025-05-17T21:28:30.931Z" }, + { url = "https://files.pythonhosted.org/packages/7a/4f/1cb5fdc353a5f5cc7feb692db9b8ec2c3d6405453f982435efc52561df58/numpy-2.2.6-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:5a6429d4be8ca66d889b7cf70f536a397dc45ba6faeb5f8c5427935d9592e9cf", size = 6878301, upload-time = "2025-05-17T21:28:41.613Z" }, + { url = "https://files.pythonhosted.org/packages/eb/17/96a3acd228cec142fcb8723bd3cc39c2a474f7dcf0a5d16731980bcafa95/numpy-2.2.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:efd28d4e9cd7d7a8d39074a4d44c63eda73401580c5c76acda2ce969e0a38e83", size = 14297320, upload-time = "2025-05-17T21:29:02.78Z" }, + { url = "https://files.pythonhosted.org/packages/b4/63/3de6a34ad7ad6646ac7d2f55ebc6ad439dbbf9c4370017c50cf403fb19b5/numpy-2.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc7b73d02efb0e18c000e9ad8b83480dfcd5dfd11065997ed4c6747470ae8915", size = 16801050, upload-time = "2025-05-17T21:29:27.675Z" }, + { url = "https://files.pythonhosted.org/packages/07/b6/89d837eddef52b3d0cec5c6ba0456c1bf1b9ef6a6672fc2b7873c3ec4e2e/numpy-2.2.6-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:74d4531beb257d2c3f4b261bfb0fc09e0f9ebb8842d82a7b4209415896adc680", size = 15807034, upload-time = "2025-05-17T21:29:51.102Z" }, + { url = "https://files.pythonhosted.org/packages/01/c8/dc6ae86e3c61cfec1f178e5c9f7858584049b6093f843bca541f94120920/numpy-2.2.6-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:8fc377d995680230e83241d8a96def29f204b5782f371c532579b4f20607a289", size = 18614185, upload-time = "2025-05-17T21:30:18.703Z" }, + { url = "https://files.pythonhosted.org/packages/5b/c5/0064b1b7e7c89137b471ccec1fd2282fceaae0ab3a9550f2568782d80357/numpy-2.2.6-cp310-cp310-win32.whl", hash = "sha256:b093dd74e50a8cba3e873868d9e93a85b78e0daf2e98c6797566ad8044e8363d", size = 6527149, upload-time = "2025-05-17T21:30:29.788Z" }, + { url = "https://files.pythonhosted.org/packages/a3/dd/4b822569d6b96c39d1215dbae0582fd99954dcbcf0c1a13c61783feaca3f/numpy-2.2.6-cp310-cp310-win_amd64.whl", hash = "sha256:f0fd6321b839904e15c46e0d257fdd101dd7f530fe03fd6359c1ea63738703f3", size = 12904620, upload-time = "2025-05-17T21:30:48.994Z" }, + { url = "https://files.pythonhosted.org/packages/da/a8/4f83e2aa666a9fbf56d6118faaaf5f1974d456b1823fda0a176eff722839/numpy-2.2.6-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f9f1adb22318e121c5c69a09142811a201ef17ab257a1e66ca3025065b7f53ae", size = 21176963, upload-time = "2025-05-17T21:31:19.36Z" }, + { url = "https://files.pythonhosted.org/packages/b3/2b/64e1affc7972decb74c9e29e5649fac940514910960ba25cd9af4488b66c/numpy-2.2.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c820a93b0255bc360f53eca31a0e676fd1101f673dda8da93454a12e23fc5f7a", size = 14406743, upload-time = "2025-05-17T21:31:41.087Z" }, + { url = "https://files.pythonhosted.org/packages/4a/9f/0121e375000b5e50ffdd8b25bf78d8e1a5aa4cca3f185d41265198c7b834/numpy-2.2.6-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:3d70692235e759f260c3d837193090014aebdf026dfd167834bcba43e30c2a42", size = 5352616, upload-time = "2025-05-17T21:31:50.072Z" }, + { url = "https://files.pythonhosted.org/packages/31/0d/b48c405c91693635fbe2dcd7bc84a33a602add5f63286e024d3b6741411c/numpy-2.2.6-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:481b49095335f8eed42e39e8041327c05b0f6f4780488f61286ed3c01368d491", size = 6889579, upload-time = "2025-05-17T21:32:01.712Z" }, + { url = "https://files.pythonhosted.org/packages/52/b8/7f0554d49b565d0171eab6e99001846882000883998e7b7d9f0d98b1f934/numpy-2.2.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b64d8d4d17135e00c8e346e0a738deb17e754230d7e0810ac5012750bbd85a5a", size = 14312005, upload-time = "2025-05-17T21:32:23.332Z" }, + { url = "https://files.pythonhosted.org/packages/b3/dd/2238b898e51bd6d389b7389ffb20d7f4c10066d80351187ec8e303a5a475/numpy-2.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba10f8411898fc418a521833e014a77d3ca01c15b0c6cdcce6a0d2897e6dbbdf", size = 16821570, upload-time = "2025-05-17T21:32:47.991Z" }, + { url = "https://files.pythonhosted.org/packages/83/6c/44d0325722cf644f191042bf47eedad61c1e6df2432ed65cbe28509d404e/numpy-2.2.6-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:bd48227a919f1bafbdda0583705e547892342c26fb127219d60a5c36882609d1", size = 15818548, upload-time = "2025-05-17T21:33:11.728Z" }, + { url = "https://files.pythonhosted.org/packages/ae/9d/81e8216030ce66be25279098789b665d49ff19eef08bfa8cb96d4957f422/numpy-2.2.6-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:9551a499bf125c1d4f9e250377c1ee2eddd02e01eac6644c080162c0c51778ab", size = 18620521, upload-time = "2025-05-17T21:33:39.139Z" }, + { url = "https://files.pythonhosted.org/packages/6a/fd/e19617b9530b031db51b0926eed5345ce8ddc669bb3bc0044b23e275ebe8/numpy-2.2.6-cp311-cp311-win32.whl", hash = "sha256:0678000bb9ac1475cd454c6b8c799206af8107e310843532b04d49649c717a47", size = 6525866, upload-time = "2025-05-17T21:33:50.273Z" }, + { url = "https://files.pythonhosted.org/packages/31/0a/f354fb7176b81747d870f7991dc763e157a934c717b67b58456bc63da3df/numpy-2.2.6-cp311-cp311-win_amd64.whl", hash = "sha256:e8213002e427c69c45a52bbd94163084025f533a55a59d6f9c5b820774ef3303", size = 12907455, upload-time = "2025-05-17T21:34:09.135Z" }, + { url = "https://files.pythonhosted.org/packages/82/5d/c00588b6cf18e1da539b45d3598d3557084990dcc4331960c15ee776ee41/numpy-2.2.6-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:41c5a21f4a04fa86436124d388f6ed60a9343a6f767fced1a8a71c3fbca038ff", size = 20875348, upload-time = "2025-05-17T21:34:39.648Z" }, + { url = "https://files.pythonhosted.org/packages/66/ee/560deadcdde6c2f90200450d5938f63a34b37e27ebff162810f716f6a230/numpy-2.2.6-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:de749064336d37e340f640b05f24e9e3dd678c57318c7289d222a8a2f543e90c", size = 14119362, upload-time = "2025-05-17T21:35:01.241Z" }, + { url = "https://files.pythonhosted.org/packages/3c/65/4baa99f1c53b30adf0acd9a5519078871ddde8d2339dc5a7fde80d9d87da/numpy-2.2.6-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:894b3a42502226a1cac872f840030665f33326fc3dac8e57c607905773cdcde3", size = 5084103, upload-time = "2025-05-17T21:35:10.622Z" }, + { url = "https://files.pythonhosted.org/packages/cc/89/e5a34c071a0570cc40c9a54eb472d113eea6d002e9ae12bb3a8407fb912e/numpy-2.2.6-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:71594f7c51a18e728451bb50cc60a3ce4e6538822731b2933209a1f3614e9282", size = 6625382, upload-time = "2025-05-17T21:35:21.414Z" }, + { url = "https://files.pythonhosted.org/packages/f8/35/8c80729f1ff76b3921d5c9487c7ac3de9b2a103b1cd05e905b3090513510/numpy-2.2.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f2618db89be1b4e05f7a1a847a9c1c0abd63e63a1607d892dd54668dd92faf87", size = 14018462, upload-time = "2025-05-17T21:35:42.174Z" }, + { url = "https://files.pythonhosted.org/packages/8c/3d/1e1db36cfd41f895d266b103df00ca5b3cbe965184df824dec5c08c6b803/numpy-2.2.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd83c01228a688733f1ded5201c678f0c53ecc1006ffbc404db9f7a899ac6249", size = 16527618, upload-time = "2025-05-17T21:36:06.711Z" }, + { url = "https://files.pythonhosted.org/packages/61/c6/03ed30992602c85aa3cd95b9070a514f8b3c33e31124694438d88809ae36/numpy-2.2.6-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:37c0ca431f82cd5fa716eca9506aefcabc247fb27ba69c5062a6d3ade8cf8f49", size = 15505511, upload-time = "2025-05-17T21:36:29.965Z" }, + { url = "https://files.pythonhosted.org/packages/b7/25/5761d832a81df431e260719ec45de696414266613c9ee268394dd5ad8236/numpy-2.2.6-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:fe27749d33bb772c80dcd84ae7e8df2adc920ae8297400dabec45f0dedb3f6de", size = 18313783, upload-time = "2025-05-17T21:36:56.883Z" }, + { url = "https://files.pythonhosted.org/packages/57/0a/72d5a3527c5ebffcd47bde9162c39fae1f90138c961e5296491ce778e682/numpy-2.2.6-cp312-cp312-win32.whl", hash = "sha256:4eeaae00d789f66c7a25ac5f34b71a7035bb474e679f410e5e1a94deb24cf2d4", size = 6246506, upload-time = "2025-05-17T21:37:07.368Z" }, + { url = "https://files.pythonhosted.org/packages/36/fa/8c9210162ca1b88529ab76b41ba02d433fd54fecaf6feb70ef9f124683f1/numpy-2.2.6-cp312-cp312-win_amd64.whl", hash = "sha256:c1f9540be57940698ed329904db803cf7a402f3fc200bfe599334c9bd84a40b2", size = 12614190, upload-time = "2025-05-17T21:37:26.213Z" }, + { url = "https://files.pythonhosted.org/packages/f9/5c/6657823f4f594f72b5471f1db1ab12e26e890bb2e41897522d134d2a3e81/numpy-2.2.6-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0811bb762109d9708cca4d0b13c4f67146e3c3b7cf8d34018c722adb2d957c84", size = 20867828, upload-time = "2025-05-17T21:37:56.699Z" }, + { url = "https://files.pythonhosted.org/packages/dc/9e/14520dc3dadf3c803473bd07e9b2bd1b69bc583cb2497b47000fed2fa92f/numpy-2.2.6-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:287cc3162b6f01463ccd86be154f284d0893d2b3ed7292439ea97eafa8170e0b", size = 14143006, upload-time = "2025-05-17T21:38:18.291Z" }, + { url = "https://files.pythonhosted.org/packages/4f/06/7e96c57d90bebdce9918412087fc22ca9851cceaf5567a45c1f404480e9e/numpy-2.2.6-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:f1372f041402e37e5e633e586f62aa53de2eac8d98cbfb822806ce4bbefcb74d", size = 5076765, upload-time = "2025-05-17T21:38:27.319Z" }, + { url = "https://files.pythonhosted.org/packages/73/ed/63d920c23b4289fdac96ddbdd6132e9427790977d5457cd132f18e76eae0/numpy-2.2.6-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:55a4d33fa519660d69614a9fad433be87e5252f4b03850642f88993f7b2ca566", size = 6617736, upload-time = "2025-05-17T21:38:38.141Z" }, + { url = "https://files.pythonhosted.org/packages/85/c5/e19c8f99d83fd377ec8c7e0cf627a8049746da54afc24ef0a0cb73d5dfb5/numpy-2.2.6-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f92729c95468a2f4f15e9bb94c432a9229d0d50de67304399627a943201baa2f", size = 14010719, upload-time = "2025-05-17T21:38:58.433Z" }, + { url = "https://files.pythonhosted.org/packages/19/49/4df9123aafa7b539317bf6d342cb6d227e49f7a35b99c287a6109b13dd93/numpy-2.2.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1bc23a79bfabc5d056d106f9befb8d50c31ced2fbc70eedb8155aec74a45798f", size = 16526072, upload-time = "2025-05-17T21:39:22.638Z" }, + { url = "https://files.pythonhosted.org/packages/b2/6c/04b5f47f4f32f7c2b0e7260442a8cbcf8168b0e1a41ff1495da42f42a14f/numpy-2.2.6-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:e3143e4451880bed956e706a3220b4e5cf6172ef05fcc397f6f36a550b1dd868", size = 15503213, upload-time = "2025-05-17T21:39:45.865Z" }, + { url = "https://files.pythonhosted.org/packages/17/0a/5cd92e352c1307640d5b6fec1b2ffb06cd0dabe7d7b8227f97933d378422/numpy-2.2.6-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:b4f13750ce79751586ae2eb824ba7e1e8dba64784086c98cdbbcc6a42112ce0d", size = 18316632, upload-time = "2025-05-17T21:40:13.331Z" }, + { url = "https://files.pythonhosted.org/packages/f0/3b/5cba2b1d88760ef86596ad0f3d484b1cbff7c115ae2429678465057c5155/numpy-2.2.6-cp313-cp313-win32.whl", hash = "sha256:5beb72339d9d4fa36522fc63802f469b13cdbe4fdab4a288f0c441b74272ebfd", size = 6244532, upload-time = "2025-05-17T21:43:46.099Z" }, + { url = "https://files.pythonhosted.org/packages/cb/3b/d58c12eafcb298d4e6d0d40216866ab15f59e55d148a5658bb3132311fcf/numpy-2.2.6-cp313-cp313-win_amd64.whl", hash = "sha256:b0544343a702fa80c95ad5d3d608ea3599dd54d4632df855e4c8d24eb6ecfa1c", size = 12610885, upload-time = "2025-05-17T21:44:05.145Z" }, + { url = "https://files.pythonhosted.org/packages/6b/9e/4bf918b818e516322db999ac25d00c75788ddfd2d2ade4fa66f1f38097e1/numpy-2.2.6-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:0bca768cd85ae743b2affdc762d617eddf3bcf8724435498a1e80132d04879e6", size = 20963467, upload-time = "2025-05-17T21:40:44Z" }, + { url = "https://files.pythonhosted.org/packages/61/66/d2de6b291507517ff2e438e13ff7b1e2cdbdb7cb40b3ed475377aece69f9/numpy-2.2.6-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:fc0c5673685c508a142ca65209b4e79ed6740a4ed6b2267dbba90f34b0b3cfda", size = 14225144, upload-time = "2025-05-17T21:41:05.695Z" }, + { url = "https://files.pythonhosted.org/packages/e4/25/480387655407ead912e28ba3a820bc69af9adf13bcbe40b299d454ec011f/numpy-2.2.6-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:5bd4fc3ac8926b3819797a7c0e2631eb889b4118a9898c84f585a54d475b7e40", size = 5200217, upload-time = "2025-05-17T21:41:15.903Z" }, + { url = "https://files.pythonhosted.org/packages/aa/4a/6e313b5108f53dcbf3aca0c0f3e9c92f4c10ce57a0a721851f9785872895/numpy-2.2.6-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:fee4236c876c4e8369388054d02d0e9bb84821feb1a64dd59e137e6511a551f8", size = 6712014, upload-time = "2025-05-17T21:41:27.321Z" }, + { url = "https://files.pythonhosted.org/packages/b7/30/172c2d5c4be71fdf476e9de553443cf8e25feddbe185e0bd88b096915bcc/numpy-2.2.6-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e1dda9c7e08dc141e0247a5b8f49cf05984955246a327d4c48bda16821947b2f", size = 14077935, upload-time = "2025-05-17T21:41:49.738Z" }, + { url = "https://files.pythonhosted.org/packages/12/fb/9e743f8d4e4d3c710902cf87af3512082ae3d43b945d5d16563f26ec251d/numpy-2.2.6-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f447e6acb680fd307f40d3da4852208af94afdfab89cf850986c3ca00562f4fa", size = 16600122, upload-time = "2025-05-17T21:42:14.046Z" }, + { url = "https://files.pythonhosted.org/packages/12/75/ee20da0e58d3a66f204f38916757e01e33a9737d0b22373b3eb5a27358f9/numpy-2.2.6-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:389d771b1623ec92636b0786bc4ae56abafad4a4c513d36a55dce14bd9ce8571", size = 15586143, upload-time = "2025-05-17T21:42:37.464Z" }, + { url = "https://files.pythonhosted.org/packages/76/95/bef5b37f29fc5e739947e9ce5179ad402875633308504a52d188302319c8/numpy-2.2.6-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8e9ace4a37db23421249ed236fdcdd457d671e25146786dfc96835cd951aa7c1", size = 18385260, upload-time = "2025-05-17T21:43:05.189Z" }, + { url = "https://files.pythonhosted.org/packages/09/04/f2f83279d287407cf36a7a8053a5abe7be3622a4363337338f2585e4afda/numpy-2.2.6-cp313-cp313t-win32.whl", hash = "sha256:038613e9fb8c72b0a41f025a7e4c3f0b7a1b5d768ece4796b674c8f3fe13efff", size = 6377225, upload-time = "2025-05-17T21:43:16.254Z" }, + { url = "https://files.pythonhosted.org/packages/67/0e/35082d13c09c02c011cf21570543d202ad929d961c02a147493cb0c2bdf5/numpy-2.2.6-cp313-cp313t-win_amd64.whl", hash = "sha256:6031dd6dfecc0cf9f668681a37648373bddd6421fff6c66ec1624eed0180ee06", size = 12771374, upload-time = "2025-05-17T21:43:35.479Z" }, + { url = "https://files.pythonhosted.org/packages/9e/3b/d94a75f4dbf1ef5d321523ecac21ef23a3cd2ac8b78ae2aac40873590229/numpy-2.2.6-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:0b605b275d7bd0c640cad4e5d30fa701a8d59302e127e5f79138ad62762c3e3d", size = 21040391, upload-time = "2025-05-17T21:44:35.948Z" }, + { url = "https://files.pythonhosted.org/packages/17/f4/09b2fa1b58f0fb4f7c7963a1649c64c4d315752240377ed74d9cd878f7b5/numpy-2.2.6-pp310-pypy310_pp73-macosx_14_0_x86_64.whl", hash = "sha256:7befc596a7dc9da8a337f79802ee8adb30a552a94f792b9c9d18c840055907db", size = 6786754, upload-time = "2025-05-17T21:44:47.446Z" }, + { url = "https://files.pythonhosted.org/packages/af/30/feba75f143bdc868a1cc3f44ccfa6c4b9ec522b36458e738cd00f67b573f/numpy-2.2.6-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ce47521a4754c8f4593837384bd3424880629f718d87c5d44f8ed763edd63543", size = 16643476, upload-time = "2025-05-17T21:45:11.871Z" }, + { url = "https://files.pythonhosted.org/packages/37/48/ac2a9584402fb6c0cd5b5d1a91dcf176b15760130dd386bbafdbfe3640bf/numpy-2.2.6-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:d042d24c90c41b54fd506da306759e06e568864df8ec17ccc17e9e884634fd00", size = 12812666, upload-time = "2025-05-17T21:45:31.426Z" }, +] + +[[package]] +name = "numpy" +version = "2.3.0" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.11'", +] +sdist = { url = "https://files.pythonhosted.org/packages/f3/db/8e12381333aea300890829a0a36bfa738cac95475d88982d538725143fd9/numpy-2.3.0.tar.gz", hash = "sha256:581f87f9e9e9db2cba2141400e160e9dd644ee248788d6f90636eeb8fd9260a6", size = 20382813, upload-time = "2025-06-07T14:54:32.608Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/fd/5f/df67435257d827eb3b8af66f585223dc2c3f2eb7ad0b50cb1dae2f35f494/numpy-2.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c3c9fdde0fa18afa1099d6257eb82890ea4f3102847e692193b54e00312a9ae9", size = 21199688, upload-time = "2025-06-07T14:36:52.067Z" }, + { url = "https://files.pythonhosted.org/packages/e5/ce/aad219575055d6c9ef29c8c540c81e1c38815d3be1fe09cdbe53d48ee838/numpy-2.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:46d16f72c2192da7b83984aa5455baee640e33a9f1e61e656f29adf55e406c2b", size = 14359277, upload-time = "2025-06-07T14:37:15.325Z" }, + { url = "https://files.pythonhosted.org/packages/29/6b/2d31da8e6d2ec99bed54c185337a87f8fbeccc1cd9804e38217e92f3f5e2/numpy-2.3.0-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:a0be278be9307c4ab06b788f2a077f05e180aea817b3e41cebbd5aaf7bd85ed3", size = 5376069, upload-time = "2025-06-07T14:37:25.636Z" }, + { url = "https://files.pythonhosted.org/packages/7d/2a/6c59a062397553ec7045c53d5fcdad44e4536e54972faa2ba44153bca984/numpy-2.3.0-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:99224862d1412d2562248d4710126355d3a8db7672170a39d6909ac47687a8a4", size = 6913057, upload-time = "2025-06-07T14:37:37.215Z" }, + { url = "https://files.pythonhosted.org/packages/d5/5a/8df16f258d28d033e4f359e29d3aeb54663243ac7b71504e89deeb813202/numpy-2.3.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:2393a914db64b0ead0ab80c962e42d09d5f385802006a6c87835acb1f58adb96", size = 14568083, upload-time = "2025-06-07T14:37:59.337Z" }, + { url = "https://files.pythonhosted.org/packages/0a/92/0528a563dfc2cdccdcb208c0e241a4bb500d7cde218651ffb834e8febc50/numpy-2.3.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:7729c8008d55e80784bd113787ce876ca117185c579c0d626f59b87d433ea779", size = 16929402, upload-time = "2025-06-07T14:38:24.343Z" }, + { url = "https://files.pythonhosted.org/packages/e4/2f/e7a8c8d4a2212c527568d84f31587012cf5497a7271ea1f23332142f634e/numpy-2.3.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:06d4fb37a8d383b769281714897420c5cc3545c79dc427df57fc9b852ee0bf58", size = 15879193, upload-time = "2025-06-07T14:38:48.007Z" }, + { url = "https://files.pythonhosted.org/packages/e2/c3/dada3f005953847fe35f42ac0fe746f6e1ea90b4c6775e4be605dcd7b578/numpy-2.3.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:c39ec392b5db5088259c68250e342612db82dc80ce044cf16496cf14cf6bc6f8", size = 18665318, upload-time = "2025-06-07T14:39:15.794Z" }, + { url = "https://files.pythonhosted.org/packages/3b/ae/3f448517dedefc8dd64d803f9d51a8904a48df730e00a3c5fb1e75a60620/numpy-2.3.0-cp311-cp311-win32.whl", hash = "sha256:ee9d3ee70d62827bc91f3ea5eee33153212c41f639918550ac0475e3588da59f", size = 6601108, upload-time = "2025-06-07T14:39:27.176Z" }, + { url = "https://files.pythonhosted.org/packages/8c/4a/556406d2bb2b9874c8cbc840c962683ac28f21efbc9b01177d78f0199ca1/numpy-2.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:43c55b6a860b0eb44d42341438b03513cf3879cb3617afb749ad49307e164edd", size = 13021525, upload-time = "2025-06-07T14:39:46.637Z" }, + { url = "https://files.pythonhosted.org/packages/ed/ee/bf54278aef30335ffa9a189f869ea09e1a195b3f4b93062164a3b02678a7/numpy-2.3.0-cp311-cp311-win_arm64.whl", hash = "sha256:2e6a1409eee0cb0316cb64640a49a49ca44deb1a537e6b1121dc7c458a1299a8", size = 10170327, upload-time = "2025-06-07T14:40:02.703Z" }, + { url = "https://files.pythonhosted.org/packages/89/59/9df493df81ac6f76e9f05cdbe013cdb0c9a37b434f6e594f5bd25e278908/numpy-2.3.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:389b85335838155a9076e9ad7f8fdba0827496ec2d2dc32ce69ce7898bde03ba", size = 20897025, upload-time = "2025-06-07T14:40:33.558Z" }, + { url = "https://files.pythonhosted.org/packages/2f/86/4ff04335901d6cf3a6bb9c748b0097546ae5af35e455ae9b962ebff4ecd7/numpy-2.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9498f60cd6bb8238d8eaf468a3d5bb031d34cd12556af53510f05fcf581c1b7e", size = 14129882, upload-time = "2025-06-07T14:40:55.034Z" }, + { url = "https://files.pythonhosted.org/packages/71/8d/a942cd4f959de7f08a79ab0c7e6cecb7431d5403dce78959a726f0f57aa1/numpy-2.3.0-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:622a65d40d8eb427d8e722fd410ac3ad4958002f109230bc714fa551044ebae2", size = 5110181, upload-time = "2025-06-07T14:41:04.4Z" }, + { url = "https://files.pythonhosted.org/packages/86/5d/45850982efc7b2c839c5626fb67fbbc520d5b0d7c1ba1ae3651f2f74c296/numpy-2.3.0-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:b9446d9d8505aadadb686d51d838f2b6688c9e85636a0c3abaeb55ed54756459", size = 6647581, upload-time = "2025-06-07T14:41:14.695Z" }, + { url = "https://files.pythonhosted.org/packages/1a/c0/c871d4a83f93b00373d3eebe4b01525eee8ef10b623a335ec262b58f4dc1/numpy-2.3.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:50080245365d75137a2bf46151e975de63146ae6d79f7e6bd5c0e85c9931d06a", size = 14262317, upload-time = "2025-06-07T14:41:35.862Z" }, + { url = "https://files.pythonhosted.org/packages/b7/f6/bc47f5fa666d5ff4145254f9e618d56e6a4ef9b874654ca74c19113bb538/numpy-2.3.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:c24bb4113c66936eeaa0dc1e47c74770453d34f46ee07ae4efd853a2ed1ad10a", size = 16633919, upload-time = "2025-06-07T14:42:00.622Z" }, + { url = "https://files.pythonhosted.org/packages/f5/b4/65f48009ca0c9b76df5f404fccdea5a985a1bb2e34e97f21a17d9ad1a4ba/numpy-2.3.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:4d8d294287fdf685281e671886c6dcdf0291a7c19db3e5cb4178d07ccf6ecc67", size = 15567651, upload-time = "2025-06-07T14:42:24.429Z" }, + { url = "https://files.pythonhosted.org/packages/f1/62/5367855a2018578e9334ed08252ef67cc302e53edc869666f71641cad40b/numpy-2.3.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:6295f81f093b7f5769d1728a6bd8bf7466de2adfa771ede944ce6711382b89dc", size = 18361723, upload-time = "2025-06-07T14:42:51.167Z" }, + { url = "https://files.pythonhosted.org/packages/d4/75/5baed8cd867eabee8aad1e74d7197d73971d6a3d40c821f1848b8fab8b84/numpy-2.3.0-cp312-cp312-win32.whl", hash = "sha256:e6648078bdd974ef5d15cecc31b0c410e2e24178a6e10bf511e0557eed0f2570", size = 6318285, upload-time = "2025-06-07T14:43:02.052Z" }, + { url = "https://files.pythonhosted.org/packages/bc/49/d5781eaa1a15acb3b3a3f49dc9e2ff18d92d0ce5c2976f4ab5c0a7360250/numpy-2.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:0898c67a58cdaaf29994bc0e2c65230fd4de0ac40afaf1584ed0b02cd74c6fdd", size = 12732594, upload-time = "2025-06-07T14:43:21.071Z" }, + { url = "https://files.pythonhosted.org/packages/c2/1c/6d343e030815c7c97a1f9fbad00211b47717c7fe446834c224bd5311e6f1/numpy-2.3.0-cp312-cp312-win_arm64.whl", hash = "sha256:bd8df082b6c4695753ad6193018c05aac465d634834dca47a3ae06d4bb22d9ea", size = 9891498, upload-time = "2025-06-07T14:43:36.332Z" }, + { url = "https://files.pythonhosted.org/packages/73/fc/1d67f751fd4dbafc5780244fe699bc4084268bad44b7c5deb0492473127b/numpy-2.3.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:5754ab5595bfa2c2387d241296e0381c21f44a4b90a776c3c1d39eede13a746a", size = 20889633, upload-time = "2025-06-07T14:44:06.839Z" }, + { url = "https://files.pythonhosted.org/packages/e8/95/73ffdb69e5c3f19ec4530f8924c4386e7ba097efc94b9c0aff607178ad94/numpy-2.3.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:d11fa02f77752d8099573d64e5fe33de3229b6632036ec08f7080f46b6649959", size = 14151683, upload-time = "2025-06-07T14:44:28.847Z" }, + { url = "https://files.pythonhosted.org/packages/64/d5/06d4bb31bb65a1d9c419eb5676173a2f90fd8da3c59f816cc54c640ce265/numpy-2.3.0-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:aba48d17e87688a765ab1cd557882052f238e2f36545dfa8e29e6a91aef77afe", size = 5102683, upload-time = "2025-06-07T14:44:38.417Z" }, + { url = "https://files.pythonhosted.org/packages/12/8b/6c2cef44f8ccdc231f6b56013dff1d71138c48124334aded36b1a1b30c5a/numpy-2.3.0-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:4dc58865623023b63b10d52f18abaac3729346a7a46a778381e0e3af4b7f3beb", size = 6640253, upload-time = "2025-06-07T14:44:49.359Z" }, + { url = "https://files.pythonhosted.org/packages/62/aa/fca4bf8de3396ddb59544df9b75ffe5b73096174de97a9492d426f5cd4aa/numpy-2.3.0-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:df470d376f54e052c76517393fa443758fefcdd634645bc9c1f84eafc67087f0", size = 14258658, upload-time = "2025-06-07T14:45:10.156Z" }, + { url = "https://files.pythonhosted.org/packages/1c/12/734dce1087eed1875f2297f687e671cfe53a091b6f2f55f0c7241aad041b/numpy-2.3.0-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:87717eb24d4a8a64683b7a4e91ace04e2f5c7c77872f823f02a94feee186168f", size = 16628765, upload-time = "2025-06-07T14:45:35.076Z" }, + { url = "https://files.pythonhosted.org/packages/48/03/ffa41ade0e825cbcd5606a5669962419528212a16082763fc051a7247d76/numpy-2.3.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:d8fa264d56882b59dcb5ea4d6ab6f31d0c58a57b41aec605848b6eb2ef4a43e8", size = 15564335, upload-time = "2025-06-07T14:45:58.797Z" }, + { url = "https://files.pythonhosted.org/packages/07/58/869398a11863310aee0ff85a3e13b4c12f20d032b90c4b3ee93c3b728393/numpy-2.3.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e651756066a0eaf900916497e20e02fe1ae544187cb0fe88de981671ee7f6270", size = 18360608, upload-time = "2025-06-07T14:46:25.687Z" }, + { url = "https://files.pythonhosted.org/packages/2f/8a/5756935752ad278c17e8a061eb2127c9a3edf4ba2c31779548b336f23c8d/numpy-2.3.0-cp313-cp313-win32.whl", hash = "sha256:e43c3cce3b6ae5f94696669ff2a6eafd9a6b9332008bafa4117af70f4b88be6f", size = 6310005, upload-time = "2025-06-07T14:50:13.138Z" }, + { url = "https://files.pythonhosted.org/packages/08/60/61d60cf0dfc0bf15381eaef46366ebc0c1a787856d1db0c80b006092af84/numpy-2.3.0-cp313-cp313-win_amd64.whl", hash = "sha256:81ae0bf2564cf475f94be4a27ef7bcf8af0c3e28da46770fc904da9abd5279b5", size = 12729093, upload-time = "2025-06-07T14:50:31.82Z" }, + { url = "https://files.pythonhosted.org/packages/66/31/2f2f2d2b3e3c32d5753d01437240feaa32220b73258c9eef2e42a0832866/numpy-2.3.0-cp313-cp313-win_arm64.whl", hash = "sha256:c8738baa52505fa6e82778580b23f945e3578412554d937093eac9205e845e6e", size = 9885689, upload-time = "2025-06-07T14:50:47.888Z" }, + { url = "https://files.pythonhosted.org/packages/f1/89/c7828f23cc50f607ceb912774bb4cff225ccae7131c431398ad8400e2c98/numpy-2.3.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:39b27d8b38942a647f048b675f134dd5a567f95bfff481f9109ec308515c51d8", size = 20986612, upload-time = "2025-06-07T14:46:56.077Z" }, + { url = "https://files.pythonhosted.org/packages/dd/46/79ecf47da34c4c50eedec7511e53d57ffdfd31c742c00be7dc1d5ffdb917/numpy-2.3.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:0eba4a1ea88f9a6f30f56fdafdeb8da3774349eacddab9581a21234b8535d3d3", size = 14298953, upload-time = "2025-06-07T14:47:18.053Z" }, + { url = "https://files.pythonhosted.org/packages/59/44/f6caf50713d6ff4480640bccb2a534ce1d8e6e0960c8f864947439f0ee95/numpy-2.3.0-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:b0f1f11d0a1da54927436505a5a7670b154eac27f5672afc389661013dfe3d4f", size = 5225806, upload-time = "2025-06-07T14:47:27.524Z" }, + { url = "https://files.pythonhosted.org/packages/a6/43/e1fd1aca7c97e234dd05e66de4ab7a5be54548257efcdd1bc33637e72102/numpy-2.3.0-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:690d0a5b60a47e1f9dcec7b77750a4854c0d690e9058b7bef3106e3ae9117808", size = 6735169, upload-time = "2025-06-07T14:47:38.057Z" }, + { url = "https://files.pythonhosted.org/packages/84/89/f76f93b06a03177c0faa7ca94d0856c4e5c4bcaf3c5f77640c9ed0303e1c/numpy-2.3.0-cp313-cp313t-manylinux_2_28_aarch64.whl", hash = "sha256:8b51ead2b258284458e570942137155978583e407babc22e3d0ed7af33ce06f8", size = 14330701, upload-time = "2025-06-07T14:47:59.113Z" }, + { url = "https://files.pythonhosted.org/packages/aa/f5/4858c3e9ff7a7d64561b20580cf7cc5d085794bd465a19604945d6501f6c/numpy-2.3.0-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:aaf81c7b82c73bd9b45e79cfb9476cb9c29e937494bfe9092c26aece812818ad", size = 16692983, upload-time = "2025-06-07T14:48:24.196Z" }, + { url = "https://files.pythonhosted.org/packages/08/17/0e3b4182e691a10e9483bcc62b4bb8693dbf9ea5dc9ba0b77a60435074bb/numpy-2.3.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:f420033a20b4f6a2a11f585f93c843ac40686a7c3fa514060a97d9de93e5e72b", size = 15641435, upload-time = "2025-06-07T14:48:47.712Z" }, + { url = "https://files.pythonhosted.org/packages/4e/d5/463279fda028d3c1efa74e7e8d507605ae87f33dbd0543cf4c4527c8b882/numpy-2.3.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:d344ca32ab482bcf8735d8f95091ad081f97120546f3d250240868430ce52555", size = 18433798, upload-time = "2025-06-07T14:49:14.866Z" }, + { url = "https://files.pythonhosted.org/packages/0e/1e/7a9d98c886d4c39a2b4d3a7c026bffcf8fbcaf518782132d12a301cfc47a/numpy-2.3.0-cp313-cp313t-win32.whl", hash = "sha256:48a2e8eaf76364c32a1feaa60d6925eaf32ed7a040183b807e02674305beef61", size = 6438632, upload-time = "2025-06-07T14:49:25.67Z" }, + { url = "https://files.pythonhosted.org/packages/fe/ab/66fc909931d5eb230107d016861824f335ae2c0533f422e654e5ff556784/numpy-2.3.0-cp313-cp313t-win_amd64.whl", hash = "sha256:ba17f93a94e503551f154de210e4d50c5e3ee20f7e7a1b5f6ce3f22d419b93bb", size = 12868491, upload-time = "2025-06-07T14:49:44.898Z" }, + { url = "https://files.pythonhosted.org/packages/ee/e8/2c8a1c9e34d6f6d600c83d5ce5b71646c32a13f34ca5c518cc060639841c/numpy-2.3.0-cp313-cp313t-win_arm64.whl", hash = "sha256:f14e016d9409680959691c109be98c436c6249eaf7f118b424679793607b5944", size = 9935345, upload-time = "2025-06-07T14:50:02.311Z" }, + { url = "https://files.pythonhosted.org/packages/6a/a2/f8c1133f90eaa1c11bbbec1dc28a42054d0ce74bc2c9838c5437ba5d4980/numpy-2.3.0-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:80b46117c7359de8167cc00a2c7d823bdd505e8c7727ae0871025a86d668283b", size = 21070759, upload-time = "2025-06-07T14:51:18.241Z" }, + { url = "https://files.pythonhosted.org/packages/6c/e0/4c05fc44ba28463096eee5ae2a12832c8d2759cc5bcec34ae33386d3ff83/numpy-2.3.0-pp311-pypy311_pp73-macosx_14_0_arm64.whl", hash = "sha256:5814a0f43e70c061f47abd5857d120179609ddc32a613138cbb6c4e9e2dbdda5", size = 5301054, upload-time = "2025-06-07T14:51:27.413Z" }, + { url = "https://files.pythonhosted.org/packages/8a/3b/6c06cdebe922bbc2a466fe2105f50f661238ea223972a69c7deb823821e7/numpy-2.3.0-pp311-pypy311_pp73-macosx_14_0_x86_64.whl", hash = "sha256:ef6c1e88fd6b81ac6d215ed71dc8cd027e54d4bf1d2682d362449097156267a2", size = 6817520, upload-time = "2025-06-07T14:51:38.015Z" }, + { url = "https://files.pythonhosted.org/packages/9d/a3/1e536797fd10eb3c5dbd2e376671667c9af19e241843548575267242ea02/numpy-2.3.0-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:33a5a12a45bb82d9997e2c0b12adae97507ad7c347546190a18ff14c28bbca12", size = 14398078, upload-time = "2025-06-07T14:52:00.122Z" }, + { url = "https://files.pythonhosted.org/packages/7c/61/9d574b10d9368ecb1a0c923952aa593510a20df4940aa615b3a71337c8db/numpy-2.3.0-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:54dfc8681c1906d239e95ab1508d0a533c4a9505e52ee2d71a5472b04437ef97", size = 16751324, upload-time = "2025-06-07T14:52:25.077Z" }, + { url = "https://files.pythonhosted.org/packages/39/de/bcad52ce972dc26232629ca3a99721fd4b22c1d2bda84d5db6541913ef9c/numpy-2.3.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:e017a8a251ff4d18d71f139e28bdc7c31edba7a507f72b1414ed902cbe48c74d", size = 12924237, upload-time = "2025-06-07T14:52:44.713Z" }, +] + [[package]] name = "packaging" version = "25.0" From 776cf50423da896cf7a923f0968043b14364a462 Mon Sep 17 00:00:00 2001 From: David Graham Date: Sun, 15 Jun 2025 19:24:08 -0400 Subject: [PATCH 2/8] minimal working example exposing the data as a numpy array via method --- src/core/bindings.cpp | 11 ++++++++--- src/libseis/_gather.pyi | 8 ++++++++ tests/libseis/test_gather.py | 3 ++- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/core/bindings.cpp b/src/core/bindings.cpp index 2886e56..c7319db 100644 --- a/src/core/bindings.cpp +++ b/src/core/bindings.cpp @@ -3,8 +3,8 @@ // #include "add/add.hpp" +#include #include -#include #include "gather.hpp" @@ -43,10 +43,15 @@ PYBIND11_MODULE(_gather, m) { .def(py::init(), py::arg("id"), py::arg("nt"), py::arg("nx"), py::arg("dt")) .def_readwrite("id", &Gather::id) + .def_readwrite("dt", &Gather::dt) .def_readwrite("nt", &Gather::nt) .def_readwrite("nx", &Gather::nx) - .def_readwrite("dt", &Gather::dt) - .def_readonly("data", &Gather::data) + .def("as_numpy", + [](Gather &self) -> py::array_t { + return py::array_t( + {self.nt, self.nx}, {sizeof(double) * self.nx, sizeof(double)}, + self.data.data(), py::cast(&self)); + }) .def("__str__", &Gather::str) .def("from_bin_file", &Gather::from_bin_file); } diff --git a/src/libseis/_gather.pyi b/src/libseis/_gather.pyi index 972f1eb..0bf3072 100644 --- a/src/libseis/_gather.pyi +++ b/src/libseis/_gather.pyi @@ -27,3 +27,11 @@ class Gather: Returns: Self: An instance of Gather with data loaded. """ + + def as_numpy(self) -> list[float]: + """ + Convert the gather data to a numpy array. + + Returns: + list[float]: The gather data as a numpy array. + """ diff --git a/tests/libseis/test_gather.py b/tests/libseis/test_gather.py index b994cac..61acf35 100644 --- a/tests/libseis/test_gather.py +++ b/tests/libseis/test_gather.py @@ -1,3 +1,4 @@ +import numpy as np import pytest from libseis import Gather @@ -36,4 +37,4 @@ def test_read_gather(self, seismic_trace_1d_file): """Test reading a gather.""" # Assuming the Gather class has a method to read data gather = Gather.from_bin_file(seismic_trace_1d_file, 4, 1, 0.004) - assert isinstance(gather.data, list) + assert isinstance(gather.as_numpy(), np.ndarray) From 0e0bc05a242e669ac99f7f3c94ccd36604c73778 Mon Sep 17 00:00:00 2001 From: David Graham Date: Sun, 15 Jun 2025 19:36:48 -0400 Subject: [PATCH 3/8] implement data as a private property that only accepts a numpy array --- src/core/bindings.cpp | 26 ++++++++++++++++++++------ src/libseis/_gather.pyi | 12 +++--------- tests/libseis/test_gather.py | 2 +- 3 files changed, 24 insertions(+), 16 deletions(-) diff --git a/src/core/bindings.cpp b/src/core/bindings.cpp index c7319db..d929ca5 100644 --- a/src/core/bindings.cpp +++ b/src/core/bindings.cpp @@ -46,12 +46,26 @@ PYBIND11_MODULE(_gather, m) { .def_readwrite("dt", &Gather::dt) .def_readwrite("nt", &Gather::nt) .def_readwrite("nx", &Gather::nx) - .def("as_numpy", - [](Gather &self) -> py::array_t { - return py::array_t( - {self.nt, self.nx}, {sizeof(double) * self.nx, sizeof(double)}, - self.data.data(), py::cast(&self)); - }) + .def_property( + "_data", + // Getter: return numpy array (zero-copy) + [](Gather &self) -> py::array { + return py::array({self.nt, self.nx}, + {sizeof(double) * self.nx, sizeof(double)}, + self.data.data(), py::cast(&self)); + }, + // Setter: accept 2D NumPy array and copy into C++ vector + [](Gather &self, + const py::array_t &arr) { + if (arr.ndim() != 2) + throw std::runtime_error("data must be 2D"); + if (arr.shape(0) != self.nt || arr.shape(1) != self.nx) + throw std::runtime_error("Shape mismatch with (nt, nx)"); + + std::memcpy(self.data.data(), arr.data(), + sizeof(double) * self.nt * self.nx); + }) .def("__str__", &Gather::str) .def("from_bin_file", &Gather::from_bin_file); } diff --git a/src/libseis/_gather.pyi b/src/libseis/_gather.pyi index 0bf3072..4fcf566 100644 --- a/src/libseis/_gather.pyi +++ b/src/libseis/_gather.pyi @@ -1,5 +1,7 @@ from typing import Self +import numpy as np + class Gather: """ A seismic gather. @@ -9,7 +11,7 @@ class Gather: nt: int nx: int dt: float - data: list[float] + _data: np.ndarray def __init__( self, id: int = 0, nt: int = 0, nx: int = 0, dt: float = 0 @@ -27,11 +29,3 @@ class Gather: Returns: Self: An instance of Gather with data loaded. """ - - def as_numpy(self) -> list[float]: - """ - Convert the gather data to a numpy array. - - Returns: - list[float]: The gather data as a numpy array. - """ diff --git a/tests/libseis/test_gather.py b/tests/libseis/test_gather.py index 61acf35..ffb519e 100644 --- a/tests/libseis/test_gather.py +++ b/tests/libseis/test_gather.py @@ -37,4 +37,4 @@ def test_read_gather(self, seismic_trace_1d_file): """Test reading a gather.""" # Assuming the Gather class has a method to read data gather = Gather.from_bin_file(seismic_trace_1d_file, 4, 1, 0.004) - assert isinstance(gather.as_numpy(), np.ndarray) + assert isinstance(gather._data, np.ndarray) From 5a2493cf3d2bc58a653a098931d511ccac2e3d52 Mon Sep 17 00:00:00 2001 From: David Graham Date: Thu, 19 Jun 2025 20:00:40 -0400 Subject: [PATCH 4/8] add clang format to CI --- .clang-format | 81 ++++++++++++++++++++++++++++++++ .github/workflows/CI.yml | 19 +++++++- .pre-commit-config.yaml | 84 +++++++++++++++++----------------- src/core/add/add.cpp | 6 ++- src/core/add/add.hpp | 2 +- src/core/bindings.cpp | 19 ++++---- src/core/gather/gather.hpp | 16 +++---- src/core/velocity/velocity.cpp | 7 ++- src/core/velocity/velocity.hpp | 10 ++-- 9 files changed, 168 insertions(+), 76 deletions(-) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..5a877e0 --- /dev/null +++ b/.clang-format @@ -0,0 +1,81 @@ +# Google C/C++ Code Style settings +# https://clang.llvm.org/docs/ClangFormatStyleOptions.html +Language: Cpp +BasedOnStyle: Google +AccessModifierOffset: -1 +AlignAfterOpenBracket: Align +AlignConsecutiveAssignments: None +AlignOperands: Align +AllowAllArgumentsOnNextLine: true +AllowAllConstructorInitializersOnNextLine: true +AllowAllParametersOfDeclarationOnNextLine: false +AllowShortBlocksOnASingleLine: Empty +AllowShortCaseLabelsOnASingleLine: false +AllowShortFunctionsOnASingleLine: Inline +AllowShortIfStatementsOnASingleLine: Never # To avoid conflict, set this "Never" and each "if statement" should include brace when coding +AllowShortLambdasOnASingleLine: Inline +AllowShortLoopsOnASingleLine: false +AlwaysBreakAfterReturnType: None +AlwaysBreakTemplateDeclarations: Yes +BinPackArguments: true +BreakBeforeBraces: Custom +BraceWrapping: + AfterCaseLabel: false + AfterClass: false + AfterStruct: false + AfterControlStatement: Never + AfterEnum: false + AfterFunction: false + AfterNamespace: false + AfterUnion: false + AfterExternBlock: false + BeforeCatch: false + BeforeElse: false + BeforeLambdaBody: false + IndentBraces: false + SplitEmptyFunction: false + SplitEmptyRecord: false + SplitEmptyNamespace: false +BreakBeforeBinaryOperators: None +BreakBeforeTernaryOperators: true +BreakConstructorInitializers: BeforeColon +BreakInheritanceList: BeforeColon +ColumnLimit: 100 +CompactNamespaces: false +ContinuationIndentWidth: 4 +Cpp11BracedListStyle: true +DerivePointerAlignment: false # Make sure the * or & align on the left +EmptyLineBeforeAccessModifier: LogicalBlock +FixNamespaceComments: true +IncludeBlocks: Preserve +IndentCaseLabels: true +IndentPPDirectives: None +IndentWidth: 2 +KeepEmptyLinesAtTheStartOfBlocks: true +MaxEmptyLinesToKeep: 1 +NamespaceIndentation: None +ObjCSpaceAfterProperty: false +ObjCSpaceBeforeProtocolList: true +PointerAlignment: Left +ReflowComments: false +# SeparateDefinitionBlocks: Always # Only support since clang-format 14 +SpaceAfterCStyleCast: false +SpaceAfterLogicalNot: false +SpaceAfterTemplateKeyword: true +SpaceBeforeAssignmentOperators: true +SpaceBeforeCpp11BracedList: false +SpaceBeforeCtorInitializerColon: true +SpaceBeforeInheritanceColon: true +SpaceBeforeParens: ControlStatements +SpaceBeforeRangeBasedForLoopColon: true +SpaceBeforeSquareBrackets: false +SpaceInEmptyParentheses: false +SpacesBeforeTrailingComments: 2 +SpacesInAngles: false +SpacesInCStyleCastParentheses: false +SpacesInContainerLiterals: false +SpacesInParentheses: false +SpacesInSquareBrackets: false +Standard: c++11 +TabWidth: 4 +UseTab: Never diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a935dd5..b76d5eb 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -3,7 +3,7 @@ name: CI on: push: branches: - - "main" + - "main" pull_request: env: @@ -37,6 +37,23 @@ jobs: # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: ctest -C ${{env.BUILD_TYPE}} + lint_cpp: + name: "Lint C++" + strategy: + matrix: + os: [ ubuntu-latest ] + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v4 + + - name: 'Run clang-format.' + uses: jidicula/clang-format-action@v4.15.0 + with: + clang-format-version: '20' + check-path: 'src' + + python_tests: name: "Python Tests" strategy: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5450612..5ad0fc4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,49 +17,49 @@ ci: autofix_commit_msg: "style: pre-commit fixes" repos: -# Standard hooks -- repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 - hooks: - - id: check-added-large-files - - id: check-case-conflict - - id: check-merge-conflict - - id: check-symlinks - - id: check-yaml - exclude: ^conda\.recipe/meta\.yaml$ - - id: debug-statements - - id: end-of-file-fixer - - id: mixed-line-ending - - id: requirements-txt-fixer - - id: trailing-whitespace + # Standard hooks + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: check-added-large-files + - id: check-case-conflict + - id: check-merge-conflict + - id: check-symlinks + - id: check-yaml + exclude: ^conda\.recipe/meta\.yaml$ + - id: debug-statements + - id: end-of-file-fixer + - id: mixed-line-ending + - id: requirements-txt-fixer + - id: trailing-whitespace -# Check linting and style issues -- repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.11.12" - hooks: - - id: ruff - args: ["--fix", "--show-fixes"] - - id: ruff-format - exclude: ^(docs) + # Check linting and style issues + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: "v0.11.12" + hooks: + - id: ruff + args: [ "--fix", "--show-fixes" ] + - id: ruff-format + exclude: ^(docs) -# Changes tabs to spaces -- repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.5.5 - hooks: - - id: remove-tabs - exclude: ^(docs) + # Changes tabs to spaces + - repo: https://github.com/Lucas-C/pre-commit-hooks + rev: v1.5.5 + hooks: + - id: remove-tabs + exclude: ^(docs) -# CMake formatting -- repo: https://github.com/cheshirekow/cmake-format-precommit - rev: v0.6.13 - hooks: - - id: cmake-format - additional_dependencies: [pyyaml] - types: [file] - files: (\.cmake|CMakeLists.txt)(.in)?$ + # CMake formatting + - repo: https://github.com/cheshirekow/cmake-format-precommit + rev: v0.6.13 + hooks: + - id: cmake-format + additional_dependencies: [ pyyaml ] + types: [ file ] + files: (\.cmake|CMakeLists.txt)(.in)?$ -# .clang-format file -- repo: https://github.com/pre-commit/mirrors-clang-format - rev: v13.0.0 - hooks: - - id: clang-format + # .clang-format file + - repo: https://github.com/pre-commit/mirrors-clang-format + rev: v20.1.6 + hooks: + - id: clang-format diff --git a/src/core/add/add.cpp b/src/core/add/add.cpp index fa79458..977f2ea 100644 --- a/src/core/add/add.cpp +++ b/src/core/add/add.cpp @@ -5,5 +5,7 @@ #include "add.hpp" namespace libseis { -int add(const int i, const int j) { return i + j; } -} // namespace libseis +int add(const int i, const int j) { + return i + j; +} +} // namespace libseis diff --git a/src/core/add/add.hpp b/src/core/add/add.hpp index 44f858a..3cf5120 100644 --- a/src/core/add/add.hpp +++ b/src/core/add/add.hpp @@ -9,4 +9,4 @@ namespace libseis { int add(int i, int j); } -#endif // CPPLIB_LIBRARY_H +#endif // CPPLIB_LIBRARY_H diff --git a/src/core/bindings.cpp b/src/core/bindings.cpp index d929ca5..94da5ff 100644 --- a/src/core/bindings.cpp +++ b/src/core/bindings.cpp @@ -2,9 +2,9 @@ // Created by David Graham on 6/8/25. // -#include "add/add.hpp" #include #include +#include "add/add.hpp" #include "gather.hpp" @@ -40,8 +40,8 @@ PYBIND11_MODULE(_num, m) { PYBIND11_MODULE(_gather, m) { py::class_(m, "Gather") // .def(py::init()) - .def(py::init(), py::arg("id"), py::arg("nt"), - py::arg("nx"), py::arg("dt")) + .def(py::init(), py::arg("id"), py::arg("nt"), py::arg("nx"), + py::arg("dt")) .def_readwrite("id", &Gather::id) .def_readwrite("dt", &Gather::dt) .def_readwrite("nt", &Gather::nt) @@ -49,22 +49,19 @@ PYBIND11_MODULE(_gather, m) { .def_property( "_data", // Getter: return numpy array (zero-copy) - [](Gather &self) -> py::array { - return py::array({self.nt, self.nx}, - {sizeof(double) * self.nx, sizeof(double)}, + [](Gather& self) -> py::array { + return py::array({self.nt, self.nx}, {sizeof(double) * self.nx, sizeof(double)}, self.data.data(), py::cast(&self)); }, // Setter: accept 2D NumPy array and copy into C++ vector - [](Gather &self, - const py::array_t &arr) { + [](Gather& self, + const py::array_t& arr) { if (arr.ndim() != 2) throw std::runtime_error("data must be 2D"); if (arr.shape(0) != self.nt || arr.shape(1) != self.nx) throw std::runtime_error("Shape mismatch with (nt, nx)"); - std::memcpy(self.data.data(), arr.data(), - sizeof(double) * self.nt * self.nx); + std::memcpy(self.data.data(), arr.data(), sizeof(double) * self.nt * self.nx); }) .def("__str__", &Gather::str) .def("from_bin_file", &Gather::from_bin_file); diff --git a/src/core/gather/gather.hpp b/src/core/gather/gather.hpp index 52fb0d7..cb660fc 100644 --- a/src/core/gather/gather.hpp +++ b/src/core/gather/gather.hpp @@ -11,7 +11,7 @@ #include class Gather { -public: + public: int id{}; int nt{}; int nx{}; @@ -28,14 +28,12 @@ class Gather { /** * @brief a helper function used for Python __str__ method. */ - [[nodiscard]] std::string str() const { - return "Gather id: " + std::to_string(id); - } + [[nodiscard]] std::string str() const { return "Gather id: " + std::to_string(id); } /** * @brief overload the output stream operator for Gather. */ - friend std::ostream &operator<<(std::ostream &os, const Gather &gather) { + friend std::ostream& operator<<(std::ostream& os, const Gather& gather) { os << "Gather id: " << gather.id << std::endl; return os; } @@ -51,8 +49,7 @@ class Gather { * @param nx the number of traces per gather. * @return Gather object populated with data from the file. */ - static Gather from_bin_file(const std::string &path, int nt, int nx, - double dt = 0.0) { + static Gather from_bin_file(const std::string& path, int nt, int nx, double dt = 0.0) { std::ifstream file(path, std::ios::binary); if (!file) { throw std::runtime_error("Unable to open file at " + path); @@ -61,8 +58,7 @@ class Gather { std::size_t total_values = static_cast(nt) * nx; std::vector buffer(total_values); - file.read(reinterpret_cast(buffer.data()), - total_values * sizeof(double)); + file.read(reinterpret_cast(buffer.data()), total_values * sizeof(double)); if (!file) { throw std::runtime_error("Failed to read data from file at " + path); } @@ -73,4 +69,4 @@ class Gather { } }; -#endif // GATHER_H +#endif // GATHER_H diff --git a/src/core/velocity/velocity.cpp b/src/core/velocity/velocity.cpp index a42013c..def0c0d 100644 --- a/src/core/velocity/velocity.cpp +++ b/src/core/velocity/velocity.cpp @@ -11,16 +11,15 @@ VelocityModel::VelocityModel(const int rows, const int cols) } } -double &VelocityModel::at(const int row, const int col) { +double& VelocityModel::at(const int row, const int col) { return _data.at(row * _cols + col); } -const double &VelocityModel::at(int row, int col) const { +const double& VelocityModel::at(int row, int col) const { return _data.at(row * _cols + col); } -void VelocityModel::initialize_simple_model(const double gradient, - const double starting_velocity) { +void VelocityModel::initialize_simple_model(const double gradient, const double starting_velocity) { for (int i = 0; i < _rows; ++i) { for (int j = 0; j < _cols; ++j) { at(i, j) = starting_velocity + gradient * i; diff --git a/src/core/velocity/velocity.hpp b/src/core/velocity/velocity.hpp index bbb8a7c..42ebe0e 100644 --- a/src/core/velocity/velocity.hpp +++ b/src/core/velocity/velocity.hpp @@ -9,19 +9,19 @@ #include class VelocityModel { -public: + public: VelocityModel(int rows, int cols); - double &at(int row, int col); - const double &at(int row, int col) const; + double& at(int row, int col); + const double& at(int row, int col) const; int rows() const { return _rows; } int cols() const { return _cols; } void initialize_simple_model(double gradient, double starting_velocity); -private: + private: int _rows; int _cols; - std::vector _data; // flattened 2D array + std::vector _data; // flattened 2D array }; From 468cee74fa161f0fcc026217e5e2128a3cd206e7 Mon Sep 17 00:00:00 2001 From: David Graham Date: Thu, 19 Jun 2025 20:30:15 -0400 Subject: [PATCH 5/8] add test gather for Gather class init --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 368fcb8..ab6472a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,4 +32,8 @@ enable_testing() add_executable(libseis_test src/core/add/add_test.cpp) target_link_libraries(libseis_test libseis Python::Python GTest::gtest_main) include(GoogleTest) + +add_executable(gather_test src/core/gather/test_gather.cpp) +target_link_libraries(gather_test libseis Python::Python GTest::gtest_main) gtest_discover_tests(libseis_test) +gtest_discover_tests(gather_test) From f1f0643909f99e1ee2d458df5b67a746d8ea7e9e Mon Sep 17 00:00:00 2001 From: David Graham Date: Thu, 19 Jun 2025 20:39:31 -0400 Subject: [PATCH 6/8] fixes and use data a public property for time being --- CMakeLists.txt | 4 ---- src/core/bindings.cpp | 2 +- src/libseis/_gather.pyi | 2 +- tests/libseis/test_gather.py | 2 +- 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ab6472a..368fcb8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,8 +32,4 @@ enable_testing() add_executable(libseis_test src/core/add/add_test.cpp) target_link_libraries(libseis_test libseis Python::Python GTest::gtest_main) include(GoogleTest) - -add_executable(gather_test src/core/gather/test_gather.cpp) -target_link_libraries(gather_test libseis Python::Python GTest::gtest_main) gtest_discover_tests(libseis_test) -gtest_discover_tests(gather_test) diff --git a/src/core/bindings.cpp b/src/core/bindings.cpp index 94da5ff..2e5c6f6 100644 --- a/src/core/bindings.cpp +++ b/src/core/bindings.cpp @@ -47,7 +47,7 @@ PYBIND11_MODULE(_gather, m) { .def_readwrite("nt", &Gather::nt) .def_readwrite("nx", &Gather::nx) .def_property( - "_data", + "data", // Getter: return numpy array (zero-copy) [](Gather& self) -> py::array { return py::array({self.nt, self.nx}, {sizeof(double) * self.nx, sizeof(double)}, diff --git a/src/libseis/_gather.pyi b/src/libseis/_gather.pyi index 4fcf566..01bc4fa 100644 --- a/src/libseis/_gather.pyi +++ b/src/libseis/_gather.pyi @@ -11,7 +11,7 @@ class Gather: nt: int nx: int dt: float - _data: np.ndarray + data: np.ndarray def __init__( self, id: int = 0, nt: int = 0, nx: int = 0, dt: float = 0 diff --git a/tests/libseis/test_gather.py b/tests/libseis/test_gather.py index ffb519e..34ab6fd 100644 --- a/tests/libseis/test_gather.py +++ b/tests/libseis/test_gather.py @@ -37,4 +37,4 @@ def test_read_gather(self, seismic_trace_1d_file): """Test reading a gather.""" # Assuming the Gather class has a method to read data gather = Gather.from_bin_file(seismic_trace_1d_file, 4, 1, 0.004) - assert isinstance(gather._data, np.ndarray) + assert isinstance(gather.data, np.ndarray) From 18e0dcadeb414374068468596d6f1a1bde45799b Mon Sep 17 00:00:00 2001 From: David Graham Date: Thu, 19 Jun 2025 20:47:18 -0400 Subject: [PATCH 7/8] move implementation to cpp file from header file --- CMakeLists.txt | 1 + src/core/gather/gather.cpp | 85 +++++++++++--------------------------- src/core/gather/gather.hpp | 54 ++++++++---------------- 3 files changed, 41 insertions(+), 99 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 368fcb8..31510a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,7 @@ project( ${SKBUILD_PROJECT_NAME} VERSION ${SKBUILD_PROJECT_VERSION} LANGUAGES CXX) +set(CMAKE_POSITION_INDEPENDENT_CODE ON) # Include core modules add_subdirectory(src/core) diff --git a/src/core/gather/gather.cpp b/src/core/gather/gather.cpp index fed6777..c8a203e 100644 --- a/src/core/gather/gather.cpp +++ b/src/core/gather/gather.cpp @@ -11,66 +11,27 @@ #include #include -// struct Gather { -// int id; -// int nt; -// int nx; -// double dt; -// std::vector data; -// }; +std::string Gather::str() const { + return "Gather id: " + std::to_string(id); +} -// std::vector read_double(const std::string &path, int nt, int nx) { -// std::ifstream file(path, std::ios::binary); -// if (!file) { -// throw std::runtime_error("Unable to open file at " + path); -// } -// -// std::vector data(nt * nx); -// file.read(reinterpret_cast(data.data()), nt * nx * sizeof(double)); -// if (!file) { -// throw std::runtime_error("Failed to read data from file at " + path); -// } -// -// return data; -// } -// -// void write_double(const std::string &path, const std::vector &data, -// int nt, int nx) { -// std::ofstream file(path, std::ios::binary); -// if (!file) { -// throw std::runtime_error("Unable to open file at " + path); -// } -// -// file.write(reinterpret_cast(data.data()), -// nt * nx * sizeof(double)); -// if (!file) { -// throw std::runtime_error("Failed to write data to file at " + path); -// } -// } -// -// std::unique_ptr gain_gather(const Gather &gather, double power) { -// auto new_gather = std::make_unique(gather); -// new_gather->data.resize(gather.nt * gather.nx); -// -// for (int trace_index = 0; trace_index < gather.nx; ++trace_index) { -// for (int sample_index = 0; sample_index < gather.nt; ++sample_index) { -// double time = static_cast(sample_index) * gather.dt; -// double t_pow = std::pow(time, power); -// int data_index = trace_index * gather.nt + sample_index; -// new_gather->data[data_index] = gather.data[data_index] * t_pow; -// } -// } -// -// return new_gather; -// } -// -// void display_gather(const Gather &gather) { -// std::cout << "--------------------\n"; -// std::cout << "Gather: id " << gather.id << '\n'; -// std::cout << "Sample Rate: " << gather.dt << " seconds\n"; -// std::cout << "Sampling Frequency: " << 1.0 / gather.dt << " Hz\n"; -// std::cout << "Nyquist Frequency: " << 1.0 / (2 * gather.dt) << " Hz\n"; -// std::cout << "Samples per trace: " << gather.nt << '\n'; -// std::cout << "Number of traces: " << gather.nx << '\n'; -// std::cout << "--------------------\n"; -// } +std::ostream& operator<<(std::ostream& os, const Gather& gather) { + os << "Gather id: " << gather.id << std::endl; + return os; +} + +Gather Gather::from_bin_file(const std::string& path, int nt, int nx, double dt) { + std::ifstream file(path, std::ios::binary); + if (!file) { + throw std::runtime_error("Unable to open file at " + path); + } + std::size_t total_values = static_cast(nt) * nx; + std::vector buffer(total_values); + file.read(reinterpret_cast(buffer.data()), total_values * sizeof(double)); + if (!file) { + throw std::runtime_error("Failed to read data from file at " + path); + } + Gather result(0, nt, nx, dt); + result.data = std::move(buffer); + return result; +} diff --git a/src/core/gather/gather.hpp b/src/core/gather/gather.hpp index cb660fc..8ce52b3 100644 --- a/src/core/gather/gather.hpp +++ b/src/core/gather/gather.hpp @@ -26,47 +26,27 @@ class Gather { } /** - * @brief a helper function used for Python __str__ method. - */ - [[nodiscard]] std::string str() const { return "Gather id: " + std::to_string(id); } + * @brief a helper function used for Python __str__ method. + */ + [[nodiscard]] std::string str() const; /** - * @brief overload the output stream operator for Gather. - */ - friend std::ostream& operator<<(std::ostream& os, const Gather& gather) { - os << "Gather id: " << gather.id << std::endl; - return os; - } + * @brief overload the output stream operator for Gather. + */ + friend std::ostream& operator<<(std::ostream& os, const Gather& gather); /** - * @brief Read a binary file and create a Gather object. - * - * This function takes a file path (string), the number of time samples (nt), - * and the number of traces (nx) to read from the binary file. - * - * @param path the path to the binary file. - * @param nt the number of time samples per trace. - * @param nx the number of traces per gather. - * @return Gather object populated with data from the file. - */ - static Gather from_bin_file(const std::string& path, int nt, int nx, double dt = 0.0) { - std::ifstream file(path, std::ios::binary); - if (!file) { - throw std::runtime_error("Unable to open file at " + path); - } - - std::size_t total_values = static_cast(nt) * nx; - std::vector buffer(total_values); - - file.read(reinterpret_cast(buffer.data()), total_values * sizeof(double)); - if (!file) { - throw std::runtime_error("Failed to read data from file at " + path); - } - - Gather result(0, nt, nx, dt); - result.data = std::move(buffer); - return result; - } + * @brief Read a binary file and create a Gather object. + * + * This function takes a file path (string), the number of time samples (nt), + * and the number of traces (nx) to read from the binary file. + * + * @param path the path to the binary file. + * @param nt the number of time samples per trace. + * @param nx the number of traces per gather. + * @return Gather object populated with data from the file. + */ + static Gather from_bin_file(const std::string& path, int nt, int nx, double dt = 0.0); }; #endif // GATHER_H From 3c7ad1bff6bcc470144e1b7edb262e6e486aa6e4 Mon Sep 17 00:00:00 2001 From: David Graham Date: Thu, 19 Jun 2025 20:52:08 -0400 Subject: [PATCH 8/8] expand seismic gather unit tests --- tests/libseis/test_gather.py | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/tests/libseis/test_gather.py b/tests/libseis/test_gather.py index 34ab6fd..14e704a 100644 --- a/tests/libseis/test_gather.py +++ b/tests/libseis/test_gather.py @@ -33,8 +33,26 @@ def test_gather_has_str_method(self, gather, capfd): class TestReadSeismicData: """Test reading seismic data.""" - def test_read_gather(self, seismic_trace_1d_file): + @pytest.fixture + def nt(self) -> int: + """Number of time samples.""" + return 4 + + @pytest.fixture + def nx(self) -> int: + """Number of spatial samples.""" + return 1 + + def test_read_gather(self, seismic_trace_1d_file, nt, nx): """Test reading a gather.""" # Assuming the Gather class has a method to read data - gather = Gather.from_bin_file(seismic_trace_1d_file, 4, 1, 0.004) + gather = Gather.from_bin_file(seismic_trace_1d_file, nt, nx, 0.004) assert isinstance(gather.data, np.ndarray) + + def test_loads_dimensions_correctly(self, seismic_trace_1d_file, nt, nx): + """Test reading a gather.""" + # Assuming the Gather class has a method to read data + NUM_DIM = 2 + gather = Gather.from_bin_file(seismic_trace_1d_file, nt, nx, 0.004) + assert gather.data.ndim == NUM_DIM + assert gather.data.size == nt * nx