# Latest

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

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

**Page:** 1099

---

## [Compute Distribution among binary vector](https://discourse.julialang.org/t/compute-distribution-among-binary-vector/77792)

<div class="topic-metadata">

**Author:** [@GoYetChallenged](https://discourse.julialang.org/u/GoYetChallenged)\
**Replies:** 1\
**Last updated:** [March 12, 2022, 8:21pm UTC](https://discourse.julialang.org/t/compute-distribution-among-binary-vector/77792 "2022-03-12T20:21:43Z")

</div>

I want to compute marginal distributions among binary data.For example, I have several vectors like a = \[0, 1, 0, 1\] b = \[1, 0, 0, 1\] and compute all possible distributions, like P(a=0, b=0) = 1/4, P(a=0, b=1) = 1/4, P…

---

## [Could Optim.TwiceDifferentiable support CuArray?](https://discourse.julialang.org/t/could-optim-twicedifferentiable-support-cuarray/77670)

<div class="topic-metadata">

**Author:** [@DennisFang](https://discourse.julialang.org/u/DennisFang)\
**Replies:** 5\
**Last updated:** [March 12, 2022, 7:27pm UTC](https://discourse.julialang.org/t/could-optim-twicedifferentiable-support-cuarray/77670 "2022-03-12T19:27:25Z")

</div>

I try to transform optimization problem from CPU to GPU computing in Optim.jl. My demo examples are as follows. #Version 1-1 using Optim, CUDA f1(x) = x\[1\]^4 + x\[2\]^4 - 8 \* x\[1\] \* x\[2\] + 2.0 init = \[1.0 1.0\] opt1 = …

---

## [Logging vs pushing to dataframe](https://discourse.julialang.org/t/logging-vs-pushing-to-dataframe/77566)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 5\
**Last updated:** [March 12, 2022, 4:52pm UTC](https://discourse.julialang.org/t/logging-vs-pushing-to-dataframe/77566 "2022-03-12T16:52:04Z")

</div>

I am currently tracking progress during an iterative process in two different domains - numerical solutions of nonlinear equations, and machine learning. In order to track the progress, I have been simply pushing to a Da…

---

## [\[ANN\] ProximalAlgorithms v0.5.0: documentation and ecosystem update](https://discourse.julialang.org/t/ann-proximalalgorithms-v0-5-0-documentation-and-ecosystem-update/76738)

<div class="topic-metadata">

**Author:** [@lostella](https://discourse.julialang.org/u/lostella)\
**Replies:** 14\
**Last updated:** [March 12, 2022, 1:26pm UTC](https://discourse.julialang.org/t/ann-proximalalgorithms-v0-5-0-documentation-and-ecosystem-update/76738 "2022-03-12T13:26:23Z")

</div>

I’m happy to announce that a ProximalAlgorithms v0.5.0 was released! This new version comes with some breaking changes, and significant code overhaul. Most importantly, it comes with documentation, which was long overdue…

---

## [Computing the schur norm of a matrix](https://discourse.julialang.org/t/computing-the-schur-norm-of-a-matrix/77770)

<div class="topic-metadata">

**Author:** [@jsch77](https://discourse.julialang.org/u/jsch77)\
**Replies:** 2\
**Last updated:** [March 12, 2022, 1:11pm UTC](https://discourse.julialang.org/t/computing-the-schur-norm-of-a-matrix/77770 "2022-03-12T13:11:23Z")

</div>

using the CVX package in Matlab the following code will compute the Schur norm of matrix T. T = \[1 2;3 4\]; n = length(T); cvx\_begin sdp quiet cvx\_precision high; variable Y0(n,n) hermitian variable Y1(n,n) …

---

## [Getting Started with Julia](https://discourse.julialang.org/t/getting-started-with-julia/77735)

<div class="topic-metadata">

**Author:** [@BabyElias](https://discourse.julialang.org/u/BabyElias)\
**Replies:** 16\
**Last updated:** [March 12, 2022, 9:17am UTC](https://discourse.julialang.org/t/getting-started-with-julia/77735 "2022-03-12T09:17:53Z")

</div>

Hello! I just came across Julia language while surfing through GSoC orgs and the purpose behind the language’s creation has been really intriguing for me. So, I really want to get started with this language. I have ins…

---

## [PlotlyJS subplots](https://discourse.julialang.org/t/plotlyjs-subplots/48173)

<div class="topic-metadata">

**Author:** [@Oto\_Brzobohaty](https://discourse.julialang.org/u/Oto_Brzobohaty)\
**Replies:** 4\
**Last updated:** [March 11, 2022, 8:52pm UTC](https://discourse.julialang.org/t/plotlyjs-subplots/48173 "2022-03-11T20:52:35Z")

</div>

Is there a way how to plot subplots containing more than one scatter plot? Here is just example where I tried to put 3 scatter plots into the first subplot: using PlotlyBase trace1a = scatter(x=1:3, y=2:4) trace1b …

---

## [How do I create a PlotTheme with larger fonts in the legend](https://discourse.julialang.org/t/how-do-i-create-a-plottheme-with-larger-fonts-in-the-legend/76877)

<div class="topic-metadata">

**Author:** [@cooperrc](https://discourse.julialang.org/u/cooperrc)\
**Replies:** 3\
**Last updated:** [March 11, 2022, 8:45pm UTC](https://discourse.julialang.org/t/how-do-i-create-a-plottheme-with-larger-fonts-in-the-legend/76877 "2022-03-11T20:45:07Z")

</div>

Greetings, I started using Julia a week ago and I’m documenting my transition from a background in MATLAB + Python to Julia at cooperrc.github.io. I found myself stuck today when I tried to build my own theme and add i…

---

## [\`length.(AbstractArray\[\])\` and \`size.(AbstractArray\[\])\` return empty arrays of \`Any\`](https://discourse.julialang.org/t/length-abstractarray-and-size-abstractarray-return-empty-arrays-of-any/77749)

<div class="topic-metadata">

**Author:** [@ForceBru](https://discourse.julialang.org/u/ForceBru)\
**Replies:** 19\
**Last updated:** [March 11, 2022, 7:59pm UTC](https://discourse.julialang.org/t/length-abstractarray-and-size-abstractarray-return-empty-arrays-of-any/77749 "2022-03-11T19:59:28Z")

</div>

Code: julia\> length.(AbstractArray\[\]) Any\[\] Wat?.. I should be expecting an array of lengths, right? AbstractArray\[\] is empty, so it should be an empty array of lengths. A length is a number. The length of a finite col…

---

## [I done did it: added Julia Language support to the JMP Wish List](https://discourse.julialang.org/t/i-done-did-it-added-julia-language-support-to-the-jmp-wish-list/77769)

<div class="topic-metadata">

**Author:** [@blackeneth](https://discourse.julialang.org/u/blackeneth)\
**Replies:** 0\
**Last updated:** [March 11, 2022, 7:56pm UTC](https://discourse.julialang.org/t/i-done-did-it-added-julia-language-support-to-the-jmp-wish-list/77769 "2022-03-11T19:56:49Z")

</div>

The JMP statistical analysis software from the SAS Institute currently has language interoperability support for SQL, SAS (big daddy SAS), MATLAB, R, and Python. I added a “Wish List” item to add Julia Language support: …

---

## [Julia implementation of the Interpolate, Truncate, Project (ITP) root finding algorithm](https://discourse.julialang.org/t/julia-implementation-of-the-interpolate-truncate-project-itp-root-finding-algorithm/77739)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 7\
**Last updated:** [March 11, 2022, 7:23pm UTC](https://discourse.julialang.org/t/julia-implementation-of-the-interpolate-truncate-project-itp-root-finding-algorithm/77739 "2022-03-11T19:23:25Z")

</div>

I have been unable to find any real code implementation of ITP method - Wikipedia. However, it claims to be the bee’s knees - just read the first paragraph of the Wikipedia article: “In numerical analysis, the ITP metho…

---

## [Piping and broadcasting](https://discourse.julialang.org/t/piping-and-broadcasting/77765)

<div class="topic-metadata">

**Author:** [@kumarbalachandran](https://discourse.julialang.org/u/kumarbalachandran)\
**Replies:** 1\
**Last updated:** [March 11, 2022, 6:51pm UTC](https://discourse.julialang.org/t/piping-and-broadcasting/77765 "2022-03-11T18:51:39Z")

</div>

I was trying the pipe symbol and I noticed a quirk that probably makes sense with the precedence rules but it leaves something to be desired in expressiveness: julia\> (1,2,3) .|\> - (-1, -2, -3) julia\> (1,2,3) .|\> sin .|\>…

---

## [Question on Xpress.license function](https://discourse.julialang.org/t/question-on-xpress-license-function/77762)

<div class="topic-metadata">

**Author:** [@Marie](https://discourse.julialang.org/u/Marie)\
**Replies:** 4\
**Last updated:** [March 11, 2022, 6:09pm UTC](https://discourse.julialang.org/t/question-on-xpress-license-function/77762 "2022-03-11T18:09:50Z")

</div>

I am using Xpress and JuMP packages to solve LP problem. First i need to initialize xpress license. There’s a function under Xpress lib.jl: ‘’’ function XPRSlicense(\_i1, \_c1) ccall((:XPRSlicense, libxprs), Cint, (Ptr{…

---

## [Accessing fields of structs passed from C to Julia](https://discourse.julialang.org/t/accessing-fields-of-structs-passed-from-c-to-julia/77712)

<div class="topic-metadata">

**Author:** [@acarta](https://discourse.julialang.org/u/acarta)\
**Replies:** 9\
**Last updated:** [March 11, 2022, 6:05pm UTC](https://discourse.julialang.org/t/accessing-fields-of-structs-passed-from-c-to-julia/77712 "2022-03-11T18:05:06Z")

</div>

I’m using PackageCompiler to create a C-compatible library. The library’s main purpose is to analyze data that’s collected and passed from an existing C codebase. The communication between my library and the existing co…

---

## [Python on Windows](https://discourse.julialang.org/t/python-on-windows/76161)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 12\
**Last updated:** [March 11, 2022, 5:41pm UTC](https://discourse.julialang.org/t/python-on-windows/76161 "2022-03-11T17:41:57Z")

</div>

Don’t understand the fuss about Python on Windows. WinPython works perfectly and can either be installed in portable or integrated way. Right, can’t install pyjulia but I can’t neither with the Conda version.

---

## [Optimal control - minimum time manouvering](https://discourse.julialang.org/t/optimal-control-minimum-time-manouvering/75967)

<div class="topic-metadata">

**Author:** [@FedeClaudi](https://discourse.julialang.org/u/FedeClaudi)\
**Replies:** 5\
**Last updated:** [March 11, 2022, 5:02pm UTC](https://discourse.julialang.org/t/optimal-control-minimum-time-manouvering/75967 "2022-03-11T17:02:39Z")

</div>

Hey everyone, I’m trying to use Julia to solve a non-linear optimal control problem, the “minimum time manouvering” problem for (simulated) race cars (Casanova 2000, Van Koutrik 2015). Briefly, you have a set of differ…

---

## [@isdefined in eltype implementation](https://discourse.julialang.org/t/isdefined-in-eltype-implementation/77759)

<div class="topic-metadata">

**Author:** [@dodoplus](https://discourse.julialang.org/u/dodoplus)\
**Replies:** 2\
**Last updated:** [March 11, 2022, 4:54pm UTC](https://discourse.julialang.org/t/isdefined-in-eltype-implementation/77759 "2022-03-11T16:54:03Z")

</div>

Hi, I’m trying to figure out what @isdefined is doing here: eltype(::Type{\<:AbstractArray{E}}) where {E} = @isdefined(E) ? E : Any How can E not be defined at this point? Thanks

---

## [Install package error: curl: (60) Cert verify failed: BADCERT\_NOT\_TRUSTED](https://discourse.julialang.org/t/install-package-error-curl-60-cert-verify-failed-badcert-not-trusted/42731)

<div class="topic-metadata">

**Author:** [@Jieyi\_Xiong](https://discourse.julialang.org/u/Jieyi_Xiong)\
**Replies:** 2\
**Last updated:** [March 11, 2022, 4:29pm UTC](https://discourse.julialang.org/t/install-package-error-curl-60-cert-verify-failed-badcert-not-trusted/42731 "2022-03-11T16:29:35Z")

</div>

julia\> versioninfo() Julia Version 1.4.1 Commit 381693d3df\* (2020-04-14 17:20 UTC) Platform Info: OS: Linux (x86\_64-pc-linux-gnu) CPU: Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz WORD\_SIZE: 64 LIBM: libopenlibm L…

---

## [How choose which GPU to send the workload to in Flux.jl?](https://discourse.julialang.org/t/how-choose-which-gpu-to-send-the-workload-to-in-flux-jl/16337)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 3\
**Last updated:** [March 11, 2022, 4:14pm UTC](https://discourse.julialang.org/t/how-choose-which-gpu-to-send-the-workload-to-in-flux-jl/16337 "2022-03-11T16:14:15Z")

</div>

I have set up a neural network in Flux and I would like to train it on a GPU. HOwever my laptop has two GPUs and one is an onboard GPU so I like to send the workload to the better GPU. But how I choose which GPU to send…

---

## [Outline cell of heatmap](https://discourse.julialang.org/t/outline-cell-of-heatmap/77758)

<div class="topic-metadata">

**Author:** [@user\_231578](https://discourse.julialang.org/u/user_231578)\
**Replies:** 0\
**Last updated:** [March 11, 2022, 3:54pm UTC](https://discourse.julialang.org/t/outline-cell-of-heatmap/77758 "2022-03-11T15:54:27Z")

</div>

Suppose I have a heatmap. For example r = rand(1:10,5,5) heatmap(r) I would like to outline one of its cells with a dashed red rectangle. Do you have any suggestion on how to achieve this? See an example below, where …

---

## [Seeking Google Season of Docs Projects for 2022](https://discourse.julialang.org/t/seeking-google-season-of-docs-projects-for-2022/77755)

<div class="topic-metadata">

**Author:** [@logankilpatrick](https://discourse.julialang.org/u/logankilpatrick)\
**Replies:** 0\
**Last updated:** [March 11, 2022, 3:04pm UTC](https://discourse.julialang.org/t/seeking-google-season-of-docs-projects-for-2022/77755 "2022-03-11T15:04:31Z")

</div>

Hey folks, it is that time of year again! Google Season of Docs is fast approaching. If you are an open source project maintainer and have an idea for a documentation project that could help the ecosystem, please write u…

---

## [Is there a bug in package Market Data?](https://discourse.julialang.org/t/is-there-a-bug-in-package-market-data/77751)

<div class="topic-metadata">

**Author:** [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Replies:** 2\
**Last updated:** [March 11, 2022, 2:31pm UTC](https://discourse.julialang.org/t/is-there-a-bug-in-package-market-data/77751 "2022-03-11T14:31:58Z")

</div>

Maybe the package MarketData has a small bug. I ran the following: using Dates, DataFrames, MarketData DataFrame(yahoo("^GSPC")) The result is a dataframe with the last line duplicated. This is what is printed on the s…

---

## [How to use Flux.stop()](https://discourse.julialang.org/t/how-to-use-flux-stop/77746)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 1\
**Last updated:** [March 11, 2022, 2:14pm UTC](https://discourse.julialang.org/t/how-to-use-flux-stop/77746 "2022-03-11T14:14:54Z")

</div>

I am trying to learn how to use Flux.stop() in a callback. My problem is that as far as I can tell, my call to Flux.stop() has litterally no effect - see the following example: The setup: using Flux x\_train = randn(Flo…

---

## [Inspect inferred types and generated codes for inner functions](https://discourse.julialang.org/t/inspect-inferred-types-and-generated-codes-for-inner-functions/77688)

<div class="topic-metadata">

**Author:** [@Uroc327](https://discourse.julialang.org/u/Uroc327)\
**Replies:** 5\
**Last updated:** [March 11, 2022, 1:58pm UTC](https://discourse.julialang.org/t/inspect-inferred-types-and-generated-codes-for-inner-functions/77688 "2022-03-11T13:58:04Z")

</div>

Often it is convenient to have inner functions, eg for functional ones like mapreduce. How can I apply code inspection macros like @code\_llvm or @code\_warntype to the “full” function? Example: julia\> function test(a) …

---

## [Implementing leaf and non-leaf node by using parametric type](https://discourse.julialang.org/t/implementing-leaf-and-non-leaf-node-by-using-parametric-type/77686)

<div class="topic-metadata">

**Author:** [@ykkan](https://discourse.julialang.org/u/ykkan)\
**Replies:** 3\
**Last updated:** [March 11, 2022, 1:15pm UTC](https://discourse.julialang.org/t/implementing-leaf-and-non-leaf-node-by-using-parametric-type/77686 "2022-03-11T13:15:20Z")

</div>

Hello everyone, I would like to implement a binary tree by using the parametric type instead of inheritance. The structure is something like # leaf node struct Node{T} vale::T first\_weights::Nothing second\_weigh…

---

## [Is admonition available in Franklin.jl?](https://discourse.julialang.org/t/is-admonition-available-in-franklin-jl/77727)

<div class="topic-metadata">

**Author:** [@Natsulait](https://discourse.julialang.org/u/Natsulait)\
**Replies:** 7\
**Last updated:** [March 11, 2022, 1:13pm UTC](https://discourse.julialang.org/t/is-admonition-available-in-franklin-jl/77727 "2022-03-11T13:13:47Z")

</div>

I found that in Franklin’s website: I wonder how I can do this.

---

## [Cannot install dataset dependency](https://discourse.julialang.org/t/cannot-install-dataset-dependency/77520)

<div class="topic-metadata">

**Author:** [@Brian\_Phelan](https://discourse.julialang.org/u/Brian_Phelan)\
**Replies:** 2\
**Last updated:** [March 11, 2022, 12:54pm UTC](https://discourse.julialang.org/t/cannot-install-dataset-dependency/77520 "2022-03-11T12:54:54Z")

</div>

I’m currently training a classifier using Pluto and Julia and I need to install the CIFAR10 dataset. When I run the Julia file through Pluto it works fine but it won’t install the dataset dependency. I know the code on t…

---

## [Generalized additive models in julia?](https://discourse.julialang.org/t/generalized-additive-models-in-julia/10041)

<div class="topic-metadata">

**Author:** [@Ken-B](https://discourse.julialang.org/u/Ken-B)\
**Replies:** 9\
**Last updated:** [March 11, 2022, 12:38pm UTC](https://discourse.julialang.org/t/generalized-additive-models-in-julia/10041 "2022-03-11T12:38:29Z")

</div>

Hi, Is anyone using generalized additive models in julia? I know I can link to pyGAM with PyCall or gam with RCall, but I find both packages don’t scale well. My current dataset is of the order 100million rows. I’m wi…

---

## [JLD2 type compatibility](https://discourse.julialang.org/t/jld2-type-compatibility/77684)

<div class="topic-metadata">

**Author:** [@Alessio\_Bellisomi](https://discourse.julialang.org/u/Alessio_Bellisomi)\
**Replies:** 2\
**Last updated:** [March 11, 2022, 12:37pm UTC](https://discourse.julialang.org/t/jld2-type-compatibility/77684 "2022-03-11T12:37:24Z")

</div>

I am using JLD2 to store some data in struct format, it works great. However some of the objects need to change, as I need to add more members. e.g. struct A n::Int a::String end might become struct A n::…

---

## [Which part of these code I can change to improve the run speed and reduce the gc time?](https://discourse.julialang.org/t/which-part-of-these-code-i-can-change-to-improve-the-run-speed-and-reduce-the-gc-time/77615)

<div class="topic-metadata">

**Author:** [@Brian1](https://discourse.julialang.org/u/Brian1)\
**Replies:** 7\
**Last updated:** [March 11, 2022, 11:54am UTC](https://discourse.julialang.org/t/which-part-of-these-code-i-can-change-to-improve-the-run-speed-and-reduce-the-gc-time/77615 "2022-03-11T11:54:09Z")

</div>

I have many functions which generate its own condition function when it is called, just like these: func1()=begin datas=rand(1000) (i::Int)-\>datas\[i\]\>0 end func2()=begin datas=rand(200) (i::Int)-\>datas…

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

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