This package contains basic definitions related to indexed
profunctors. These are primarily intended as internal utilities to support
the optics and generic-lens package families.
Haskellers are usually familiar with monoids and semigroups. A monoid has
an appending operation <> (or mappend), and an identity element, mempty. A
semigroup has an appending <> operation, but does not require a mempty
element.
A Semiring has two appending operations, plus and times, and two respective
identity elements, zero and one.
More formally, a Semiring R is a set equipped with two binary relations +
and *, such that:
- (R,+) is a commutative monoid with identity element 0,
- (R,*) is a monoid with identity element 1,
- (*) left and right distributes over addition, and multiplication by '0'
annihilates R.
This package provides tools for working with various Kan extensions and Kan
lifts in Haskell.
Among the interesting bits included are:
* Right and left Kan extensions (Ran and Lan)
* Right and left Kan lifts (Rift and Lift)
* Multiple forms of the Yoneda lemma (Yoneda)
* The Codensity monad, which can be used to improve the asymptotic
complexity of code over free monads (Codensity, Density)
* A "comonad to monad-transformer transformer" that is a special case of a
right Kan lift. (CoT, Co)
Free monads are useful for many tree-like structures and domain specific
languages.
If f is a Functor then the free Monad on f is the type of trees whose nodes
are labeled with the constructors of f. The word "free" is used in the
sense of "unrestricted" rather than "zero-cost": Free f makes no
constraining assumptions beyond those given by f and the definition of
Monad. As used here it is a standard term from the mathematical theory of
adjoint functors.
Cofree comonads are dual to free monads. They provide convenient ways to
talk about branching streams and rose-trees, and can be used to annotate
syntax trees. The cofree comonad can be seen as a stream parameterized by a
Functor that controls its branching factor.
This Haskell library provides an efficient lazy wheel sieve for prime
generation inspired by "Lazy wheel sieves and spirals of primes" by Colin
Runciman and "The Genuine Sieve of Eratosthenes" by Melissa O'Neil.
5.3.7 [2022.01.09]
* Relax the Bind constraints in the following instances to Functor:
-instance (Bind f, Monad f) => Alt (MaybeT f)
-instance (Bind f, Monad f) => Plus (MaybeT f)
+instance (Functor f, Monad f) => Alt (MaybeT f)
+instance (Functor f, Monad f) => Plus (MaybeT f)
-instance (Bind f, Monad f, Semigroup e) => Alt (ExceptT e f)
-instance (Bind f, Monad f, Semigroup e, Monoid e) => Plus (ExceptT e f)
+instance (Functor f, Monad f, Semigroup e) => Alt (ExceptT e f)
+instance (Functor f, Monad f, Semigroup e, Monoid e) => Plus (ExceptT e f)
-- If building with transformers-0.5.* or older
-instance (Bind f, Monad f) => Alt (ErrorT e f)
-instance (Bind f, Monad f, Error e) => Plus (ErrorT e f
+instance (Functor f, Monad f) => Alt (ErrorT e f)
+instance (Functor f, Monad f, Error e) => Plus (ErrorT e f)
5.3.6 [2021.10.07]
* Allow building with GHC 9.2.
* Allow building with transformers-0.6.*.
* Add Alt instance for Identity.
* Add Conclude, Decide and Divise type classes and instances.
* Add (<.*>), (<*.>), and traverseMaybe functions, which make it easier to
defined Traversable1 instances for data types that have fields with a
combination of Traversable and Traversable1 instances.
* Add Semigroupoids.Do module with overloads for use with QualifiedDo.
* Add Apply, Alt, Plus, Bind and BindTrans instances for the CPS versions
of WriterT and RWST.
* Add psum function to Data.Functor.Plus.
* Add Categorical data type.
0.20 [2021.11.15]
* Support hashable-1.4. The Hashable1 instances added in 0.19.2 are removed
for all types except NonEmpty, in accordance with the corresponding
changes from hashable-1.4.
0.19.2 [2021.08.30]
* Backport Hashable1 instances for NonEmpty, Min, Max, First, Last,
WrappedMonoid, and Option.
0.3.7.0
* Make division (/) on Scientifics slightly more efficient.
* Fix the Show instance to surround negative numbers with parentheses when
necessary.
* Add (Template Haskell) Lift Scientific instance
* Mark modules as Safe or Trustworthy (Safe Haskell).
v0.11.4 (2021 Oct 3)
Maintenance and fixes
* Fix standard deviation code in density utils by replacing it with `np.std`.
v0.11.3 (2021 Oct 1)
New features
* Added `labeller` argument to enable label customization in plots and summary
* Added `arviz.labels` module with classes and utilities
* Added probability estimate within ROPE in `plot_posterior`
* Added `rope_color` and `ref_val_color` arguments to `plot_posterior`
* Improved retrieving or pointwise log likelihood in `from_cmdstanpy`, `from_cmdstan` and `from_pystan`
* Added interactive legend to bokeh `forestplot`
* Added interactive legend to bokeh `ppcplot`
* Add more helpful error message for HDF5 problems reading `InferenceData` from NetCDF
* Added `data.log_likelihood`, `stats.ic_compare_method` and `plot.density_kind` to `rcParams`
* Improve error messages in `stats.compare()`, and `var_name` parameter.
* Added ability to plot HDI contours to `plot_kde` with the new `hdi_probs` parameter.
* Add dtype parsing and setting in all Stan converters
* Add option to specify colors for each element in ppc_plot
Maintenance and fixes
* Fix conversion for numpyro models with ImproperUniform latent sites
* Fixed conversion of Pyro output fit using GPUs
* Enforced using coordinate values as default labels
* Integrate `index_origin` with all the library
* Fix pareto k threshold typo in reloo function
* Preserve shape from Stan code in `from_cmdstanpy`
* Updated `from_pystan` converters to follow schema convention
* Used generator instead of list wherever possible
* Correctly use chain index when constructing PyMC3 `DefaultTrace` in `from_pymc3`
* Fix bugs in CmdStanPyConverter
* Fix `c` argument in `plot_khat`
* Fix `ax` argument in `plot_elpd`
* Remove warning in `stats.py` compare function
* Fix `ess/rhat` plots in `plot_forest`
* Fix `from_numpyro` crash when importing model with `thinning=x` for `x > 1`
* Upload updated mypy.ini in ci if mypy copilot fails
* Added type checking to raise an error whenever `InferenceData` object is passed using `io_pymc3`'s `trace` argument
* Fix `xlabels` in `plot_elpd`
* Renamed `sample` dim to `__sample__` when stacking `chain` and `draw` to avoid dimension collision
* Removed the `circular` argument in `plot_dist` in favor of `is_circular`
* Fix `legend` argument in `plot_separation`
* Removed testing dependency on http download for radon dataset
* Fixed plot_kde to take labels with kwargs.
* Fixed xarray related tests.
* Fix Bokeh deprecation warnings
* Fix credible inteval percentage in legend in `plot_loo_pit`
* Arguments `filter_vars` and `filter_groups` now raise `ValueError` if illegal arguments are passed
* Remove constrained_layout from arviz rcparams
* Fix plot_elpd for a single outlier
Deprecation
* Deprecated `index_origin` and `order` arguments in `az.summary`
Documentation
* Language improvements of the first third of the "Label guide"
* Added "Label guide" page and API section for `arviz.labels` module
* Add "Installation guide" page to the documentation
* Improve documentation on experimental `SamplingWrapper` classes
* Added example to `plot_hdi` using Inference Data
* Removed `geweke` diagnostic from `numba` user guide
* Restructured the documentation sections to improve community and about us information
v0.11.2 (2021 Feb 21)
New features
* Added `to_zarr` and `from_zarr` methods to InferenceData
* Added confidence interval band to auto-correlation plot
Maintenance and fixes
* Updated CmdStanPy converter form compatibility with versions >=0.9.68
* Updated `from_cmdstanpy`, `from_cmdstan`, `from_numpyro` and `from_pymc3` converters to follow schema convention
* Fix calculation of mode as point estimate
* Remove variable name from legend in posterior predictive plot
* Added significant digits formatter to round rope values
* Updated `from_cmdstan`. csv reader, dtype problem fixed and dtype kwarg added for manual dtype casting
Deprecation
* Removed Geweke diagnostic
* Removed credible_interval and include_circ arguments
Documentation
* Added an example for converting dataframe to InferenceData
* Added example for `coords` argument in `plot_posterior` docstring
v0.11.1 (2021 Feb 2)
Maintenance and fixes
* Fixed ovelapping titles and repeating warnings on circular traceplot
* Removed repetitive variable names from forest plots of multivariate variables
* Fixed regression in `plot_pair` labels that prevented coord names to be shown when necessary
Documentation
* Use tabs in ArviZ example gallery
v0.11.0 (2021 Dec 17)
New features
* Added `to_dataframe` method to InferenceData
* Added `__getitem__` magic to InferenceData
* Added group argument to summary
* Add `ref_line`, `bar`, `vlines` and `marker_vlines` kwargs to `plot_rank`
* Add observed argument to (un)plot observed data in `plot_ppc`
* Add support for named dims and coordinates with multivariate observations
* Add support for discrete variables in rank plots
`loo_pit`
* Add `skipna` argument to `plot_posterior`
* Make stacking the default method to compute weights in `compare`
* Add `copy()` method to `InferenceData` class.
Maintenance and fixes
* prevent wrapping group names in InferenceData repr_html
* Updated CmdStanPy interface
* Remove left out warning about default IC scale in `compare`
* Fixed a typo found in an error message raised in `distplot.py`
* Fix typo in `loo_pit` extraction of log likelihood
* Have `from_pystan` store attrs as strings to allow netCDF storage
* Remove ticks and spines in `plot_violin`
* Use circular KDE function and fix tick labels in circular `plot_trace`
* Fix `pair_plot` for mixed discrete and continuous variables
* Fix in-sample deviance in `plot_compare`
* Fix computation of weights in compare
* Avoid repeated warning in summary
* Fix hdi failure with boolean array
* Automatically get the current axes instance for `plt_kde`, `plot_dist` and `plot_hdi`
* Add grid argument to manually specify the number of rows and columns
* Switch to `compact=True` by default in our plots
* `plot_elpd`, avoid modifying the input dict
* Do not plot divergences in `plot_trace` when `kind=rank_vlines` or `kind=rank_bars`
* Allow ignoring `observed` argument of `pymc3.DensityDist` in `from_pymc3`
* Make `from_pymc3` compatible with theano-pymc 1.1.0
* Improve typing hints
Deprecation
* `plot_khat` deprecate `annotate` argument in favor of `threshold`. The new argument accepts floats
Documentation
* Reorganize documentation and change sphinx theme
* Switch to [MyST](https://myst-parser.readthedocs.io/en/latest/) and [MyST-NB](https://myst-nb.readthedocs.io/en/latest/index.html)
for markdown/notebook parsing in docs
* Incorporated `input_core_dims` in `hdi` and `plot_hdi` docstrings
* Add documentation pages about experimental `SamplingWrapper`s usage
* Show example titles in gallery page
* Add `sample_stats` naming convention to the InferenceData schema
* Extend api documentation about `InferenceData` methods
Experimental
* Modified `SamplingWrapper` base API
v0.10.0 (2020 Sep 24)
New features
* Added InferenceData dataset containing circular variables
* Added `is_circular` argument to `plot_dist` and `plot_kde` allowing for a circular histogram (Matplotlib, Bokeh) or 1D KDE plot (Matplotlib).
* Added `to_dict` method for InferenceData object
* Added `circ_var_names` argument to `plot_trace` allowing for circular traceplot (Matplotlib)
* Ridgeplot is hdi aware. By default displays truncated densities at the specified `hdi_prop` level
* Added `plot_separation`
* Extended methods from `xr.Dataset` to `InferenceData`
* Add `extend` and `add_groups` to `InferenceData`
* Added `__iter__` method (`.items`) for InferenceData
* Add support for discrete variables in `plot_bpv`
Maintenance and fixes
* Automatic conversion of list/tuple to numpy array in distplot
* `plot_posterior` fix overlap of hdi and rope
* `plot_dist` bins argument error fixed
* Improve handling of circular variables in `az.summary`
* Removed change of default warning in `ELPDData` string representation
* Update `radon` example dataset to current InferenceData schema specification
* Update `from_cmdstan` functionality and add warmup groups
* Restructure plotting code to be compatible with mpl>=3.3
* Replaced `_fast_kde()` with `kde()` which now also supports circular variables via the argument `circular`
* Increased `from_pystan` attrs information content
* Allow `plot_trace` to return and accept axes
* Update diagnostics to be on par with posterior package
* Use method="average" in `scipy.stats.rankdata`
* Add more `plot_parallel` examples
* Bump minimum xarray version to 0.16.1
* Fix multi rope for `plot_forest`
* Bump minimum xarray version to 0.16.1
* `from_dict` will now store warmup groups even with the main group missing
* increase robustness for repr_html handling
v0.21.1 (31 January 2022)
-------------------------
This is a bugfix release to resolve
Bug fixes
~~~~~~~~~
- Add `packaging` as a dependency to Xarray
v0.21.0 (27 January 2022)
-------------------------
New Features
~~~~~~~~~~~~
- New top-level function :py:func:`cross`.
- ``keep_attrs`` support for :py:func:`where`
- Enable the limit option for dask array in the following methods :py:meth:`DataArray.ffill`, :py:meth:`DataArray.bfill`, :py:meth:`Dataset.ffill` and :py:meth:`Dataset.bfill`
Breaking changes
~~~~~~~~~~~~~~~~
- Rely on matplotlib's default datetime converters instead of pandas'
- Improve repr readability when there are a large number of dimensions in datasets or dataarrays by
wrapping the text once the maximum display width has been exceeded.
Deprecations
~~~~~~~~~~~~
- Removed the lock kwarg from the zarr and pydap backends, completing the deprecation cycle started in :issue:`5256`.
- Support for ``python 3.7`` has been dropped.
Bug fixes
~~~~~~~~~
- Preserve chunks when creating a :py:class:`DataArray` from another :py:class:`DataArray`
- Properly support :py:meth:`DataArray.ffill`, :py:meth:`DataArray.bfill`, :py:meth:`Dataset.ffill` and :py:meth:`Dataset.bfill` along chunked dimensions
- Subclasses of ``byte`` and ``str`` (e.g. ``np.str_`` and ``np.bytes_``) will now serialise to disk rather than raising a ``ValueError: unsupported dtype for netCDF4 variable: object`` as they did previously
- Fix applying function with non-xarray arguments using :py:func:`xr.map_blocks`.
- No longer raise an error for an all-nan-but-one argument to
:py:meth:`DataArray.interpolate_na` when using `method='nearest'`
- `dt.season <https://xarray.pydata.org/en/stable/generated/xarray.DataArray.dt.season.html>`_ can now handle NaN and NaT.
- Determination of zarr chunks handles empty lists for encoding chunks or variable chunks that occurs in certain cirumstances
Internal Changes
~~~~~~~~~~~~~~~~
- Replace ``distutils.version`` with ``packaging.version``
- Removed internal checks for ``pd.Panel``
- Add ``pyupgrade`` pre-commit hook
Changelog:
0.17.0:
C++ API
set the baseline C++ version to 17.
mdds has been internalized so that the public header no longer contains references to mdds. With this change, the users can use different API versions of mdds between the ixion build and run-time use.
cleaned up public API to make use of std::string_view and std::variant where appropriate.
formula interpreter
implemented built-in LEFT() function.
misc
it is no longer required to set the size of void* at build time to ensure the binaries to be fully functional.
fixed a bug where named expressions with names containing invalid characters were still allowed in.
Version 0.55.1 (27 January, 2022)
---------------------------------
This is a bugfix release that closes all the remaining issues from the
accelerated release of 0.55.0 and also any release critical regressions
discovered since then.
CUDA target deprecation notices:
* Support for CUDA toolkits < 10.2 is deprecated and will be removed in Numba
0.56.
* Support for devices with Compute Capability < 5.3 is deprecated and will be
removed in Numba 0.56.
0.11.0:
* Remove six, networkx and decorator dependency
* Bump gast and Beniget requirements to support python 3.10
* Bump xsimd to 7.5.0
* Minimal default support for non-linux, non-osx, now-windows platform
* Numpy improvements for np.bincount, np.transpose, np.searchsorted
* Restore (and test) cython compatibility
* Expose pythran.get_include for toolchain integration
* Improve error message on invalid spec
* Handle static dispatching based on keyword signature
* Raise Memory Error upon (too) large numpy alloc
* Support scalar case of scipy.special.binom
* Trim the number of warnings in pythonic codebase