Suggest numpy testing module on pytest approx docs (#8615)
Co-authored-by: Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com> Co-authored-by: Tarcisio Fischer <tarcisio@esss.co> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
This commit is contained in:
		
							parent
							
								
									a62a28b4b8
								
							
						
					
					
						commit
						b7416f7abd
					
				|  | @ -0,0 +1 @@ | ||||||
|  | Recommend `numpy.testing <https://numpy.org/doc/stable/reference/routines.testing.html>`__ module on :func:`pytest.approx` documentation. | ||||||
|  | @ -654,6 +654,14 @@ def approx(expected, rel=None, abs=None, nan_ok: bool = False) -> ApproxBase: | ||||||
|       special case that you explicitly specify an absolute tolerance but not a |       special case that you explicitly specify an absolute tolerance but not a | ||||||
|       relative tolerance, only the absolute tolerance is considered. |       relative tolerance, only the absolute tolerance is considered. | ||||||
| 
 | 
 | ||||||
|  |     .. note:: | ||||||
|  | 
 | ||||||
|  |         ``approx`` can handle numpy arrays, but we recommend the | ||||||
|  |         specialised test helpers in `numpy.testing`__ if you need | ||||||
|  |         support for comparisons, NaNs, or ULP-based tolerances. | ||||||
|  | 
 | ||||||
|  |         __ https://numpy.org/doc/stable/reference/routines.testing.html | ||||||
|  | 
 | ||||||
|     .. warning:: |     .. warning:: | ||||||
| 
 | 
 | ||||||
|        .. versionchanged:: 3.2 |        .. versionchanged:: 3.2 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue