differt 0.6.0__tar.gz → 0.6.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. {differt-0.6.0 → differt-0.6.1}/PKG-INFO +7 -6
  2. {differt-0.6.0 → differt-0.6.1}/README.md +1 -1
  3. {differt-0.6.0 → differt-0.6.1}/pyproject.toml +5 -4
  4. {differt-0.6.0 → differt-0.6.1}/src/differt/em/_antenna.py +1 -1
  5. {differt-0.6.0 → differt-0.6.1}/src/differt/em/_utd.py +1 -0
  6. {differt-0.6.0 → differt-0.6.1}/src/differt/geometry/_utils.py +2 -1
  7. {differt-0.6.0 → differt-0.6.1}/src/differt/plotting/_core.py +6 -1
  8. {differt-0.6.0 → differt-0.6.1}/src/differt/plotting/_utils.py +1 -1
  9. {differt-0.6.0 → differt-0.6.1}/src/differt/plugins/_deepmimo_types.py +1 -1
  10. {differt-0.6.0 → differt-0.6.1}/src/differt/plugins/deepmimo.py +1 -1
  11. {differt-0.6.0 → differt-0.6.1}/src/differt/rt/_utils.py +3 -1
  12. {differt-0.6.0 → differt-0.6.1}/src/differt/scene/_triangle_scene.py +2 -0
  13. {differt-0.6.0 → differt-0.6.1}/.gitignore +0 -0
  14. {differt-0.6.0 → differt-0.6.1}/LICENSE.md +0 -0
  15. {differt-0.6.0 → differt-0.6.1}/src/differt/__init__.py +0 -0
  16. {differt-0.6.0 → differt-0.6.1}/src/differt/_version.py +0 -0
  17. {differt-0.6.0 → differt-0.6.1}/src/differt/em/__init__.py +0 -0
  18. {differt-0.6.0 → differt-0.6.1}/src/differt/em/_constants.py +0 -0
  19. {differt-0.6.0 → differt-0.6.1}/src/differt/em/_fresnel.py +0 -0
  20. {differt-0.6.0 → differt-0.6.1}/src/differt/em/_interaction_type.py +0 -0
  21. {differt-0.6.0 → differt-0.6.1}/src/differt/em/_material.py +0 -0
  22. {differt-0.6.0 → differt-0.6.1}/src/differt/em/_utils.py +0 -0
  23. {differt-0.6.0 → differt-0.6.1}/src/differt/geometry/__init__.py +0 -0
  24. {differt-0.6.0 → differt-0.6.1}/src/differt/geometry/_paths.py +0 -0
  25. {differt-0.6.0 → differt-0.6.1}/src/differt/geometry/_triangle_mesh.py +0 -0
  26. {differt-0.6.0 → differt-0.6.1}/src/differt/plotting/__init__.py +0 -0
  27. {differt-0.6.0 → differt-0.6.1}/src/differt/plugins/__init__.py +0 -0
  28. {differt-0.6.0 → differt-0.6.1}/src/differt/py.typed +0 -0
  29. {differt-0.6.0 → differt-0.6.1}/src/differt/rt/__init__.py +0 -0
  30. {differt-0.6.0 → differt-0.6.1}/src/differt/rt/_fermat.py +0 -0
  31. {differt-0.6.0 → differt-0.6.1}/src/differt/rt/_image_method.py +0 -0
  32. {differt-0.6.0 → differt-0.6.1}/src/differt/scene/__init__.py +0 -0
  33. {differt-0.6.0 → differt-0.6.1}/src/differt/scene/_sionna.py +0 -0
  34. {differt-0.6.0 → differt-0.6.1}/src/differt/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: DiffeRT
3
- Version: 0.6.0
3
+ Version: 0.6.1
4
4
  Summary: Differentiable Ray Tracing Toolbox for Radio Propagation Simulations
5
5
  Project-URL: Changelog, https://github.com/jeertmans/DiffeRT/releases
6
6
  Project-URL: Documentation, https://eertmans.be/DiffeRT
@@ -11,19 +11,20 @@ Author-email: Jérome Eertmans <jeertmans@icloud.com>
11
11
  License-Expression: MIT
12
12
  License-File: LICENSE.md
13
13
  Keywords: differentiable,jax,propagation,radio,ray tracing
14
- Classifier: License :: OSI Approved :: MIT License
15
14
  Classifier: Operating System :: OS Independent
16
15
  Classifier: Programming Language :: Python :: 3
17
16
  Classifier: Programming Language :: Python :: 3.11
18
17
  Classifier: Programming Language :: Python :: 3.12
19
18
  Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Programming Language :: Python :: Free Threading
20
21
  Classifier: Topic :: Scientific/Engineering
21
22
  Requires-Python: >=3.11
22
23
  Requires-Dist: chex>=0.1.86
23
- Requires-Dist: differt-core==0.6.0
24
- Requires-Dist: equinox>=0.12.2
24
+ Requires-Dist: differt-core==0.6.1
25
+ Requires-Dist: equinox>=0.13.1
25
26
  Requires-Dist: filelock>=3.15.4
26
- Requires-Dist: jax>=0.7.0
27
+ Requires-Dist: jax>=0.7.2
27
28
  Requires-Dist: jaxtyping>=0.3.2
28
29
  Requires-Dist: numpy>=1.26.1
29
30
  Requires-Dist: optax>=0.1.7
@@ -140,7 +141,7 @@ If you use this software, please cite it as:
140
141
  author = {Eertmans, Jérome},
141
142
  url = {https://github.com/jeertmans/DiffeRT},
142
143
  license = {MIT},
143
- version = {v0.6.0}
144
+ version = {v0.6.1}
144
145
  }
145
146
  ```
146
147
 
@@ -85,7 +85,7 @@ If you use this software, please cite it as:
85
85
  author = {Eertmans, Jérome},
86
86
  url = {https://github.com/jeertmans/DiffeRT},
87
87
  license = {MIT},
88
- version = {v0.6.0}
88
+ version = {v0.6.1}
89
89
  }
90
90
  ```
91
91
 
@@ -9,16 +9,17 @@ classifiers = [
9
9
  "Programming Language :: Python :: 3.11",
10
10
  "Programming Language :: Python :: 3.12",
11
11
  "Programming Language :: Python :: 3.13",
12
- "License :: OSI Approved :: MIT License",
12
+ "Programming Language :: Python :: 3.14",
13
+ "Programming Language :: Python :: Free Threading",
13
14
  "Operating System :: OS Independent",
14
15
  "Topic :: Scientific/Engineering",
15
16
  ]
16
17
  dependencies = [
17
18
  "chex>=0.1.86",
18
- "differt-core==0.6.0",
19
- "equinox>=0.12.2",
19
+ "differt-core==0.6.1",
20
+ "equinox>=0.13.1",
20
21
  "filelock>=3.15.4",
21
- "jax>=0.7.0",
22
+ "jax>=0.7.2",
22
23
  "jaxtyping>=0.3.2",
23
24
  "numpy>=1.26.1",
24
25
  "optax>=0.1.7",
@@ -645,7 +645,7 @@ class RadiationPattern(BaseAntenna):
645
645
 
646
646
  r = self.center + distance * jnp.stack((x, y, z), axis=-1)
647
647
 
648
- s = self.poynting_vector(r)
648
+ s = self.poynting_vector(r) # type: ignore[reportAttributeAccessIssue]
649
649
 
650
650
  p = jnp.linalg.norm(s, axis=-1, keepdims=True)
651
651
 
@@ -1,4 +1,5 @@
1
1
  # ruff: noqa: N802, N806
2
+ # type: ignore # noqa: PGH003
2
3
  from functools import partial
3
4
  from typing import Any, Literal, overload
4
5
 
@@ -72,8 +72,9 @@ def normalize(
72
72
  """
73
73
  vectors = jnp.asarray(vectors)
74
74
  lengths = jnp.linalg.norm(vectors, axis=-1, keepdims=True)
75
+ lengths_no_zero: Array = jnp.where(lengths == 0.0, jnp.ones_like(lengths), lengths) # type: ignore[reportAssignmentType]
75
76
 
76
- return vectors / jnp.where(lengths == 0.0, jnp.ones_like(lengths), lengths), (
77
+ return vectors / lengths_no_zero, (
77
78
  lengths if keepdims else jnp.squeeze(lengths, axis=-1)
78
79
  )
79
80
 
@@ -555,7 +555,12 @@ def _(
555
555
 
556
556
  xs, ys, zs = np.asarray(markers).reshape(-1, 3).T
557
557
 
558
- ax.scatter(xs, ys, zs=zs, **kwargs)
558
+ ax.scatter(
559
+ xs,
560
+ ys,
561
+ zs=zs, # type: ignore[reportArgumentType]
562
+ **kwargs,
563
+ )
559
564
 
560
565
  return fig
561
566
 
@@ -573,7 +573,7 @@ def process_matplotlib_kwargs(
573
573
  return None
574
574
 
575
575
  def new_ax3d() -> Axes3D:
576
- return figure.add_subplot(projection="3d") # type: ignore[reportReturnType]
576
+ return figure.add_subplot(projection="3d")
577
577
 
578
578
  ax = maybe_ax or current_ax3d() or new_ax3d()
579
579
 
@@ -8,5 +8,5 @@ from jaxtyping import Array
8
8
  # NOTE: we declare this in another module to be able to patch it when building the docs
9
9
  ArrayType = TypeVar(
10
10
  "ArrayType",
11
- bound=Array | np.ndarray, # type: ignore[reportMissingTypeArgument]
11
+ bound=Array | np.ndarray,
12
12
  )
@@ -171,7 +171,7 @@ class DeepMIMO(eqx.Module, Generic[ArrayType]):
171
171
  """
172
172
  return jax.tree.map(jnp.asarray, self)
173
173
 
174
- def numpy(self) -> "DeepMIMO[np.ndarray]": # type: ignore[reportMissingTypeArgument]
174
+ def numpy(self) -> "DeepMIMO[np.ndarray]":
175
175
  """
176
176
  Return a new instance of this class with arrays converted to NumPy arrays.
177
177
 
@@ -278,6 +278,8 @@ def rays_intersect_triangles(
278
278
  dtype = jnp.result_type(ray_origins, ray_directions, triangle_vertices)
279
279
  epsilon = 10 * jnp.finfo(dtype).eps
280
280
 
281
+ epsilon = jnp.asarray(epsilon)
282
+
281
283
  # [*batch 3]
282
284
  vertex_0 = triangle_vertices[..., 0, :]
283
285
  vertex_1 = triangle_vertices[..., 1, :]
@@ -292,7 +294,7 @@ def rays_intersect_triangles(
292
294
 
293
295
  # [*batch]
294
296
  a = jnp.sum(h * edge_1, axis=-1)
295
- a = jnp.where(a == 0.0, jnp.inf, a) # Avoid division by zero
297
+ a: Array = jnp.where(a == 0.0, jnp.inf, a) # Avoid division by zero
296
298
 
297
299
  if smoothing_factor is not None:
298
300
  hit = smoothing_function(jnp.abs(a) - epsilon, smoothing_factor)
@@ -62,6 +62,8 @@ def _compute_paths(
62
62
  dtype = jnp.result_type(mesh.vertices, tx_vertices, tx_vertices)
63
63
  min_len = 10 * jnp.finfo(dtype).eps
64
64
 
65
+ min_len = jnp.asarray(min_len)
66
+
65
67
  # 1 - Broadcast arrays
66
68
 
67
69
  num_tx_vertices = tx_vertices.shape[0]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes