# Latest

**URL:** https://discourse.julialang.org/latest.md?page=1011

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 1012

---

## [SDDP: type Array has no field out](https://discourse.julialang.org/t/sddp-type-array-has-no-field-out/82731)

<div class="topic-metadata">

**Author:** [@chenr86](https://discourse.julialang.org/u/chenr86)\
**Replies:** 1\
**Last updated:** [June 14, 2022, 9:22am UTC](https://discourse.julialang.org/t/sddp-type-array-has-no-field-out/82731 "2022-06-14T09:22:58Z")

</div>

Hello, I’m using SDDP to solve my problem. Now I want to print the result of stage variable level, which is an array with 4 components. For loop structure is used to show the result: model = SDDP.LinearPolicyGraph( …

---

## [Errors in inference in upgraded Julia version (1.6.3 vs. 1.7.3)](https://discourse.julialang.org/t/errors-in-inference-in-upgraded-julia-version-1-6-3-vs-1-7-3/82668)

<div class="topic-metadata">

**Author:** [@vembha](https://discourse.julialang.org/u/vembha)\
**Replies:** 6\
**Last updated:** [June 14, 2022, 8:03am UTC](https://discourse.julialang.org/t/errors-in-inference-in-upgraded-julia-version-1-6-3-vs-1-7-3/82668 "2022-06-14T08:03:12Z")

</div>

Hello, I’ve been running a parallelized (4 chains) Bayesian inference code using the NUTS sampler on Julia v1.6.3 (Cent OS - HPC cluster) and was getting results as expected and without any warning during inference. I’v…

---

## [Get f from typeof(f)](https://discourse.julialang.org/t/get-f-from-typeof-f/82724)

<div class="topic-metadata">

**Author:** [@tictaccat](https://discourse.julialang.org/u/tictaccat)\
**Replies:** 1\
**Last updated:** [June 14, 2022, 4:46am UTC](https://discourse.julialang.org/t/get-f-from-typeof-f/82724 "2022-06-14T04:46:28Z")

</div>

How can I get a function f, from the type of the function, i.e. typeof(f)? Here’s the full story, to avoid the XY problem: I’m using ChainRulesOverloadGeneration which is giving me typeof(f). I would like to run Base.re…

---

## [Does Reexport break Revise?](https://discourse.julialang.org/t/does-reexport-break-revise/82717)

<div class="topic-metadata">

**Author:** [@jonathan-laurent](https://discourse.julialang.org/u/jonathan-laurent)\
**Replies:** 1\
**Last updated:** [June 14, 2022, 3:20am UTC](https://discourse.julialang.org/t/does-reexport-break-revise/82717 "2022-06-14T03:20:36Z")

</div>

Suppose one is defining the following package: module MyPackage using Reexport @reexport module Sub export f f() = 0 end end Let’s now play with it using Revise: using Revise using MyPackag…

---

## [Differentiating the Custom Layer and Regularizer](https://discourse.julialang.org/t/differentiating-the-custom-layer-and-regularizer/82594)

<div class="topic-metadata">

**Author:** [@ekiral](https://discourse.julialang.org/u/ekiral)\
**Replies:** 7\
**Last updated:** [June 14, 2022, 1:35am UTC](https://discourse.julialang.org/t/differentiating-the-custom-layer-and-regularizer/82594 "2022-06-14T01:35:32Z")

</div>

I don’t understand the error Mutating arrays is not supported. I couldn’t understand the previous posts on this topic either. I’m trying to add a very standard weight decay regulariser R(model) to my model simply define…

---

## [Get row slice both to Vector and Matrix](https://discourse.julialang.org/t/get-row-slice-both-to-vector-and-matrix/82691)

<div class="topic-metadata">

**Author:** [@Brian1](https://discourse.julialang.org/u/Brian1)\
**Replies:** 8\
**Last updated:** [June 14, 2022, 12:43am UTC](https://discourse.julialang.org/t/get-row-slice-both-to-vector-and-matrix/82691 "2022-06-14T00:43:39Z")

</div>

Is there an official way that can get row slice both to Vector and Matrix. It would works like this: vec\_data = \[1,2,3,4\] mat\_data = \[\[1,2,3,4\] \[2,3,4,5\]\] row\_index = RowIndex(1:3) vec\_data\[row\_index\] Vector{Int} 1 2…

---

## [References to Juno in the Julia documentation](https://discourse.julialang.org/t/references-to-juno-in-the-julia-documentation/82714)

<div class="topic-metadata">

**Author:** [@maxkapur](https://discourse.julialang.org/u/maxkapur)\
**Replies:** 1\
**Last updated:** [June 14, 2022, 12:03am UTC](https://discourse.julialang.org/t/references-to-juno-in-the-julia-documentation/82714 "2022-06-14T00:03:07Z")

</div>

Searching for “Juno” yields 9 results in the v1.7.3 documentation and 11 results in the 1.8.0-rc1 documentation. Some of the references make no mention of the fact that Juno is no longer actively developed: To see the …

---

## [Confusing behavior of btime](https://discourse.julialang.org/t/confusing-behavior-of-btime/82695)

<div class="topic-metadata">

**Author:** [@benninkrs](https://discourse.julialang.org/u/benninkrs)\
**Replies:** 12\
**Last updated:** [June 13, 2022, 9:34pm UTC](https://discourse.julialang.org/t/confusing-behavior-of-btime/82695 "2022-06-13T21:34:41Z")

</div>

I have a small function f whose speed I am trying to optimize. Ideally, when the argument to f is a constant or type-inferred, the function should be compiled away. When using @btime I encountered some behavior I don’t …

---

## [How can Julia macro take an Expr variable as its arguments?](https://discourse.julialang.org/t/how-can-julia-macro-take-an-expr-variable-as-its-arguments/82630)

<div class="topic-metadata">

**Author:** [@Brian1](https://discourse.julialang.org/u/Brian1)\
**Replies:** 3\
**Last updated:** [June 13, 2022, 8:45pm UTC](https://discourse.julialang.org/t/how-can-julia-macro-take-an-expr-variable-as-its-arguments/82630 "2022-06-13T20:45:54Z")

</div>

Here is a simple macro macro pre\_print(expr::Expr) println("show....") return quote $expr end end I can use it as: @pre\_print a=10 #show.... #10 But how can this macro take an expr as its argume…

---

## [Nested Dict can't figure out how to traverse the structure](https://discourse.julialang.org/t/nested-dict-cant-figure-out-how-to-traverse-the-structure/82704)

<div class="topic-metadata">

**Author:** [@anon69491625](https://discourse.julialang.org/u/anon69491625)\
**Replies:** 4\
**Last updated:** [June 13, 2022, 9:07pm UTC](https://discourse.julialang.org/t/nested-dict-cant-figure-out-how-to-traverse-the-structure/82704 "2022-06-13T21:07:16Z")

</div>

I am trying to populate a dash table and think the issue is that I don’t know how to traverse a nested dict properly. I have a Dict data\_flow = Dict{String, Any}("AMZN" =\> Dict{String, Any}("hv10" =\> "45.99", "…

---

## [Help with Julia tutorials for intermediate and advanced topics](https://discourse.julialang.org/t/help-with-julia-tutorials-for-intermediate-and-advanced-topics/82696)

<div class="topic-metadata">

**Author:** [@A\_C](https://discourse.julialang.org/u/A_C)\
**Replies:** 0\
**Last updated:** [June 13, 2022, 6:03pm UTC](https://discourse.julialang.org/t/help-with-julia-tutorials-for-intermediate-and-advanced-topics/82696 "2022-06-13T18:03:14Z")

</div>

I have been using Julia for more than a year now and I am now trying to learn some more difficult topics. Note that my background is not in CS. I work mostly in Control Engineering. Let us say we can split content in Ju…

---

## [Efficient xor cursor ... in color?](https://discourse.julialang.org/t/efficient-xor-cursor-in-color/82644)

<div class="topic-metadata">

**Author:** [@g2g](https://discourse.julialang.org/u/g2g)\
**Replies:** 1\
**Last updated:** [June 13, 2022, 5:19pm UTC](https://discourse.julialang.org/t/efficient-xor-cursor-in-color/82644 "2022-06-13T17:19:39Z")

</div>

Julia can xor a cursor image with an image when both images are gray, producing the following image with the following code: img = Array{N0f8}(reshape(range(0,stop=1,length=10^4), 100, 100)) imgx = zeros(N0f8, 21, 2…

---

## [Why are only ContinuousCallbacks exposed in ODESystem?](https://discourse.julialang.org/t/why-are-only-continuouscallbacks-exposed-in-odesystem/82623)

<div class="topic-metadata">

**Author:** [@dodoplus](https://discourse.julialang.org/u/dodoplus)\
**Replies:** 11\
**Last updated:** [June 13, 2022, 4:49pm UTC](https://discourse.julialang.org/t/why-are-only-continuouscallbacks-exposed-in-odesystem/82623 "2022-06-13T16:49:12Z")

</div>

DifferentialEquations support both discrete and continuous callbacks - but it seems only the latter kind is available when using ModelingToolkit: function ODESystem(deqs::AbstractVector{\<:Equation}, iv, dvs, ps; …

---

## [PyPlot legend font](https://discourse.julialang.org/t/pyplot-legend-font/82647)

<div class="topic-metadata">

**Author:** [@marllos](https://discourse.julialang.org/u/marllos)\
**Replies:** 2\
**Last updated:** [June 13, 2022, 4:33pm UTC](https://discourse.julialang.org/t/pyplot-legend-font/82647 "2022-06-13T16:33:08Z")

</div>

Hello everyone. I need to change the font legend in PyPlot. I have searched and can’t find a natural way to do it. Font.legend.family = monospace.

---

## [How to cite Julia packages for academic purpose?](https://discourse.julialang.org/t/how-to-cite-julia-packages-for-academic-purpose/80124)

<div class="topic-metadata">

**Author:** [@Line](https://discourse.julialang.org/u/Line)\
**Replies:** 8\
**Last updated:** [April 28, 2022, 10:20am UTC](https://discourse.julialang.org/t/how-to-cite-julia-packages-for-academic-purpose/80124 "2022-04-28T10:20:32Z")

</div>

Hi, does anyone know: How to cite Julia packages as part of a paper, master thesis or other academic purposes?

---

## [Discrete colorbar with PlotlyJS](https://discourse.julialang.org/t/discrete-colorbar-with-plotlyjs/80773)

<div class="topic-metadata">

**Author:** [@Line](https://discourse.julialang.org/u/Line)\
**Replies:** 4\
**Last updated:** [June 13, 2022, 4:29pm UTC](https://discourse.julialang.org/t/discrete-colorbar-with-plotlyjs/80773 "2022-06-13T16:29:10Z")

</div>

Hi, wonder if there is any good way to make a discrete colour bar when making a heatmap plot with PlotlyJS? It would also be nice to be able to label these.

---

## [Type management for NamedTuple's inconsistent or intended?](https://discourse.julialang.org/t/type-management-for-namedtuples-inconsistent-or-intended/82326)

<div class="topic-metadata">

**Author:** [@skraemer](https://discourse.julialang.org/u/skraemer)\
**Replies:** 4\
**Last updated:** [June 13, 2022, 3:50pm UTC](https://discourse.julialang.org/t/type-management-for-namedtuples-inconsistent-or-intended/82326 "2022-06-13T15:50:51Z")

</div>

Is there an inherent reason that type management of NamedTuple’s works differently from normal Tuple’s (in 1.7 at least)? In particular, is the behavior of the following second command (case 1.2) intended for something?…

---

## [Displaying an SVG without a notebook](https://discourse.julialang.org/t/displaying-an-svg-without-a-notebook/82684)

<div class="topic-metadata">

**Author:** [@DoktorMike](https://discourse.julialang.org/u/DoktorMike)\
**Replies:** 2\
**Last updated:** [June 13, 2022, 3:37pm UTC](https://discourse.julialang.org/t/displaying-an-svg-without-a-notebook/82684 "2022-06-13T15:37:47Z")

</div>

I’m using the excellent MolecularGraph.jl package to generate a molecular graph representation of a SMILES string. The following code works in a notebook to display the molecule, but since I’m not using notebooks I get a…

---

## [Way to write the integral with ModelingToolkit](https://discourse.julialang.org/t/way-to-write-the-integral-with-modelingtoolkit/82347)

<div class="topic-metadata">

**Author:** [@kaido975](https://discourse.julialang.org/u/kaido975)\
**Replies:** 7\
**Last updated:** [June 13, 2022, 3:22pm UTC](https://discourse.julialang.org/t/way-to-write-the-integral-with-modelingtoolkit/82347 "2022-06-13T15:22:45Z")

</div>

Is there a way to write the following integral with ModelingToolkit.jl, is binomial expansion the only option here? \\int\_{0}^{t} (t - x)^{\\lambda} u(x) d x \\quad \\text{, } \\lambda \< 0 \\quad \\text{, for } t\> 0 I want t…

---

## [Imref2d alternative in Julia](https://discourse.julialang.org/t/imref2d-alternative-in-julia/82581)

<div class="topic-metadata">

**Author:** [@Adi\_Rai](https://discourse.julialang.org/u/Adi_Rai)\
**Replies:** 9\
**Last updated:** [June 13, 2022, 2:47pm UTC](https://discourse.julialang.org/t/imref2d-alternative-in-julia/82581 "2022-06-13T14:47:01Z")

</div>

Hello Everyone, I am beginner to Julia and was trying to convert some MATLAB code to Julia. MATLAB has a function imref2d which according to MATLAB - " stores the relationship between the intrinsic coordinates anchored …

---

## [Simple linear regression with ReactiveMP - RuleMethodError?](https://discourse.julialang.org/t/simple-linear-regression-with-reactivemp-rulemethoderror/81526)

<div class="topic-metadata">

**Author:** [@svilupp](https://discourse.julialang.org/u/svilupp)\
**Replies:** 5\
**Last updated:** [June 13, 2022, 2:12pm UTC](https://discourse.julialang.org/t/simple-linear-regression-with-reactivemp-rulemethoderror/81526 "2022-06-13T14:12:18Z")

</div>

I’ve tried to implement a simple linear regression with Normal obs. model, so effectively a combination of examples: Linear Regression and Univariate Normal Mixture When I define both RVs for location and scale of the o…

---

## [Finding all binding constraints using JuMP](https://discourse.julialang.org/t/finding-all-binding-constraints-using-jump/82579)

<div class="topic-metadata">

**Author:** [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Replies:** 3\
**Last updated:** [June 13, 2022, 1:25pm UTC](https://discourse.julialang.org/t/finding-all-binding-constraints-using-jump/82579 "2022-06-13T13:25:35Z")

</div>

Is this the correct way to find all the binding constraints in JuMP? I figure it is only binding of it has a nonzero shadow-price. However shadow\_price only works for \<, \> and == constraints so I am not sure i am going…

---

## [Zero at center of Colorbar](https://discourse.julialang.org/t/zero-at-center-of-colorbar/82664)

<div class="topic-metadata">

**Author:** [@markub3327](https://discourse.julialang.org/u/markub3327)\
**Replies:** 4\
**Last updated:** [June 13, 2022, 12:25pm UTC](https://discourse.julialang.org/t/zero-at-center-of-colorbar/82664 "2022-06-13T12:25:50Z")

</div>

Hello, I use the :balance colorscheme with the ideally zero as white at the centre of Colorbar. The highest value is red and the lowest value is blue. If I have a range (-4.725205, 28.010359), I get around 10 at the cen…

---

## [Free dev-ed path…?](https://discourse.julialang.org/t/free-dev-ed-path/29065)

<div class="topic-metadata">

**Author:** [@mlhetland](https://discourse.julialang.org/u/mlhetland)\
**Replies:** 9\
**Last updated:** [June 13, 2022, 1:14pm UTC](https://discourse.julialang.org/t/free-dev-ed-path/29065 "2022-06-13T13:14:15Z")

</div>

According to the docs, free is the command to undo develop – but if a package is developed by supplying a path, free balks at that path, as it can’t be parsed as a package; and it won’t accept the package, as it’s not in…

---

## ["Optional" in-place output arguments](https://discourse.julialang.org/t/optional-in-place-output-arguments/82492)

<div class="topic-metadata">

**Author:** [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Replies:** 31\
**Last updated:** [June 13, 2022, 1:11pm UTC](https://discourse.julialang.org/t/optional-in-place-output-arguments/82492 "2022-06-13T13:11:22Z")

</div>

I am considering writing a function foo!(i1,i2,o1,o2,o3) where i1 etc. are inputs and o1 etc. are outputs. Importantly: all the outputs are preallocated (mutable) vectors, and the results are to written in place into…

---

## [What is the difference between ReinforcementLearning.jl and pomdps.jl](https://discourse.julialang.org/t/what-is-the-difference-between-reinforcementlearning-jl-and-pomdps-jl/82640)

<div class="topic-metadata">

**Author:** [@vamp](https://discourse.julialang.org/u/vamp)\
**Replies:** 5\
**Last updated:** [June 13, 2022, 12:31pm UTC](https://discourse.julialang.org/t/what-is-the-difference-between-reinforcementlearning-jl-and-pomdps-jl/82640 "2022-06-13T12:31:38Z")

</div>

Hello, I have been reading about both packages and also found this link, but I don\`t see the difference between them. Do you?

---

## [Can't get SSH auth working for private Github repos (using ssh-agent on Windows)](https://discourse.julialang.org/t/cant-get-ssh-auth-working-for-private-github-repos-using-ssh-agent-on-windows/63192)

<div class="topic-metadata">

**Author:** [@NiclasMattsson](https://discourse.julialang.org/u/NiclasMattsson)\
**Replies:** 13\
**Last updated:** [June 13, 2022, 12:12pm UTC](https://discourse.julialang.org/t/cant-get-ssh-auth-working-for-private-github-repos-using-ssh-agent-on-windows/63192 "2022-06-13T12:12:54Z")

</div>

After months of nagging from Github I’m finally switching to SSH authentication. It’s working now for command line git operations (after I set the GIT\_SSH environment variable to point to ssh.exe), but I can’t get it wor…

---

## [JuMP non-rectangular variable container: more efficient representation?](https://discourse.julialang.org/t/jump-non-rectangular-variable-container-more-efficient-representation/82669)

<div class="topic-metadata">

**Author:** [@Shuhua](https://discourse.julialang.org/u/Shuhua)\
**Replies:** 1\
**Last updated:** [June 13, 2022, 11:13am UTC](https://discourse.julialang.org/t/jump-non-rectangular-variable-container-more-efficient-representation/82669 "2022-06-13T11:13:18Z")

</div>

Let’s consider a minimal case. I have three kinds of variables: x of length 50, y of length 80, z of length 100. The length actually represents the number of time steps. I know that after time 50, x is always zero, and y…

---

## [\`unsqueeze\` or \`insertdims\` not part of Base](https://discourse.julialang.org/t/unsqueeze-or-insertdims-not-part-of-base/82508)

<div class="topic-metadata">

**Author:** [@roflmaostc](https://discourse.julialang.org/u/roflmaostc)\
**Replies:** 1\
**Last updated:** [June 13, 2022, 10:59am UTC](https://discourse.julialang.org/t/unsqueeze-or-insertdims-not-part-of-base/82508 "2022-06-13T10:59:02Z")

</div>

Hi! in Base we have dropdims which effectively calls reshape. Today, I was confused that we don’t have insertdims being the inverse to the former. There is already one implementation in MLUtils.jl for a single dim. Ho…

---

## [Weird things in docs (markdown & Documenter)](https://discourse.julialang.org/t/weird-things-in-docs-markdown-documenter/25349)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 6\
**Last updated:** [June 13, 2022, 10:34am UTC](https://discourse.julialang.org/t/weird-things-in-docs-markdown-documenter/25349 "2022-06-13T10:34:45Z")

</div>

Hi, I’m seeing strange things in the html created by Documenter as compared with the original markdown and which involve the use of \_. See the bellow examples. This is from (nevermind link address, it’s an alias from Gi…

[Previous page](https://discourse.julialang.org/latest.md?page=1010)

[Next page](https://discourse.julialang.org/latest.md?page=1012)
