# Compat with stdlib deprecations, e.g. mul!, cholesky, mean, var

**URL:** https://discourse.julialang.org/t/compat-with-stdlib-deprecations-e-g-mul-cholesky-mean-var/12375
**Category:** General Usage
**Created:** [July 14, 2018, 11:26am UTC](https://discourse.julialang.org/t/compat-with-stdlib-deprecations-e-g-mul-cholesky-mean-var/12375 "2018-07-14T11:26:07Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![alee](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alee/32/2954_2.png) [@alee](https://discourse.julialang.org/u/alee)
#### Post date: [July 14, 2018, 11:26am UTC](https://discourse.julialang.org/t/compat-with-stdlib-deprecations-e-g-mul-cholesky-mean-var/12375/1 "2018-07-14T11:26:08Z")

</div>

Apologies in advance if this has been addressed somewhere, but I couldn’t find anything.

Using the Compat.jl package has made preparing code for 0.7/1.0 while maintaining 0.6 functionality seamless, for almost all deprecations/changes that I have encountered so far. Some of the changes I have a bit more trouble with:

`A_mul_b! -> mul!`  
`chol(A) -> cholesky(A).U`  
`mean -> Statistics.mean`  
`var -> Statistics.var`

For the last two, one can e.g. import` Compat.mean` but this still gives a deprecation warning as one imports `Base.mean` in 0.7 rather than `Statistics.mean`.

I’m wondering if there is a way I have overlooked to handle these changes without explicitly conditioning on the version of julia.

---

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [July 14, 2018, 12:03pm UTC](https://discourse.julialang.org/t/compat-with-stdlib-deprecations-e-g-mul-cholesky-mean-var/12375/2 "2018-07-14T12:03:51Z")

</div>

There is an unmerged PR which should fix this:  
[https://github.com/JuliaLang/Compat.jl/pull/583](https://github.com/JuliaLang/Compat.jl/pull/583)

---

<div class="post-metadata">

### Author: ![alee](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alee/32/2954_2.png) [@alee](https://discourse.julialang.org/u/alee)
#### Post date: [July 14, 2018, 2:20pm UTC](https://discourse.julialang.org/t/compat-with-stdlib-deprecations-e-g-mul-cholesky-mean-var/12375/3 "2018-07-14T14:20:37Z")

</div>

Thanks Tamas.

I guess this won’t resolve the issue with the LinearAlgebra deprecations, even if it is merged.
