# Latest

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

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

**Page:** 1776

---

## [Reddit discussion: limitations of Zygote](https://discourse.julialang.org/t/reddit-discussion-limitations-of-zygote/36982)

<div class="topic-metadata">

**Author:** [@jaynick](https://discourse.julialang.org/u/jaynick)\
**Replies:** 15\
**Last updated:** [April 14, 2020, 9:12am UTC](https://discourse.julialang.org/t/reddit-discussion-limitations-of-zygote/36982 "2020-04-14T09:12:09Z")

</div>

There is a reddit discussion of the swift/tensorflow project that has a couple comments about Julia. I am interested in this statement - to what extent is this true? If the end goal is to “differentiate all the things…

---

## [Curl certificate issue with Pkg3 on Mac](https://discourse.julialang.org/t/curl-certificate-issue-with-pkg3-on-mac/33299)

<div class="topic-metadata">

**Author:** [@kkmann](https://discourse.julialang.org/u/kkmann)\
**Replies:** 9\
**Last updated:** [April 14, 2020, 8:17am UTC](https://discourse.julialang.org/t/curl-certificate-issue-with-pkg3-on-mac/33299 "2020-04-14T08:17:28Z")

</div>

Hey, I am running into a problem with a FFMPEG dependency on Mac. (v1.3) pkg\> build FFMPEG returns ┌ Error: Error building \`FFMPEG\`: │ \[ Info: Downloading https://github.com/JuliaBinaryWrappers/Bzip2\_jll.jl/releases/…

---

## [How to write a Macro to define the multi-index symbols](https://discourse.julialang.org/t/how-to-write-a-macro-to-define-the-multi-index-symbols/37514)

<div class="topic-metadata">

**Author:** [@gangchern](https://discourse.julialang.org/u/gangchern)\
**Replies:** 14\
**Last updated:** [April 14, 2020, 7:02am UTC](https://discourse.julialang.org/t/how-to-write-a-macro-to-define-the-multi-index-symbols/37514 "2020-04-14T07:02:24Z")

</div>

I write a Macro to define the symbols with one index as following macro varjs(x, j::Int64) vars=Expr(:block) for i = 1:j push!(vars.args, Expr(:(=), esc(Symbol("$x$i")), Expr(:quote,Symbol("$x$i")))) …

---

## [Simple loop to use previous loop value](https://discourse.julialang.org/t/simple-loop-to-use-previous-loop-value/37537)

<div class="topic-metadata">

**Author:** [@Humphrey\_Lee](https://discourse.julialang.org/u/Humphrey_Lee)\
**Replies:** 10\
**Last updated:** [April 14, 2020, 6:52am UTC](https://discourse.julialang.org/t/simple-loop-to-use-previous-loop-value/37537 "2020-04-14T06:52:29Z")

</div>

I have issue to run this supposedly simple loop. Tested two methods, but both spit errors “ERROR: LoadError: UndefVarError: ii not defined”. My objective to use the “i” from previous loop and current loop. #method 1 for…

---

## [Julia and node.js](https://discourse.julialang.org/t/julia-and-node-js/37550)

<div class="topic-metadata">

**Author:** [@colintbowers](https://discourse.julialang.org/u/colintbowers)\
**Replies:** 0\
**Last updated:** [April 14, 2020, 6:35am UTC](https://discourse.julialang.org/t/julia-and-node-js/37550 "2020-04-14T06:35:22Z")

</div>

Hi all, The node-julia package (github link) enabled calling julia functions, scripts etc from within node.js. It doesn’t appear to have seen any activity in 4 years, so I’m guessing it is probably not Julia v1.0 compat…

---

## [ENOENT error suddently appearing for both VSCode Julia and Atom editor on a Windows 10 machine](https://discourse.julialang.org/t/enoent-error-suddently-appearing-for-both-vscode-julia-and-atom-editor-on-a-windows-10-machine/37275)

<div class="topic-metadata">

**Author:** [@Zhong\_Pan](https://discourse.julialang.org/u/Zhong_Pan)\
**Replies:** 1\
**Last updated:** [April 14, 2020, 5:54am UTC](https://discourse.julialang.org/t/enoent-error-suddently-appearing-for-both-vscode-julia-and-atom-editor-on-a-windows-10-machine/37275 "2020-04-14T05:54:04Z")

</div>

I am facing a very strange problem on one of my Windows 10 64-bit machines with Julia 1.4.0. The VS Code Julia extension (version 0.15.x) were working fine. Then one day, maybe after a Windows update or installing Slack…

---

## [Possible anonymous function bug in Flux](https://discourse.julialang.org/t/possible-anonymous-function-bug-in-flux/26389)

<div class="topic-metadata">

**Author:** [@stu](https://discourse.julialang.org/u/stu)\
**Replies:** 9\
**Last updated:** [April 14, 2020, 5:49am UTC](https://discourse.julialang.org/t/possible-anonymous-function-bug-in-flux/26389 "2020-04-14T05:49:07Z")

</div>

Has anyone noticed that m = Chain(Dense(5, 2), Dense(2, 2) Dense(2, 5)) produces an entirely result than m = Chain(x -\> Dense(5, 2)(x), Dense(2, 2) Dense(2, 5)) are anonymous functions somehow not supported for Chain…

---

## [Unboxing while embedding Julia in C++?](https://discourse.julialang.org/t/unboxing-while-embedding-julia-in-c/37491)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 1\
**Last updated:** [April 14, 2020, 5:31am UTC](https://discourse.julialang.org/t/unboxing-while-embedding-julia-in-c/37491 "2020-04-14T05:31:22Z")

</div>

Hello! So I am embedding some Julia code in C++, and this Julia code returns; 2×2 Array{Array{Int64,1},2}: \[2812, 2126, 74, 1469, 892, 1881, 1693, 318, 1337, 2805 … 2742, 1390, 1916, 2307, 1110, 6, 856, 2408, 2786, …

---

## [Roots of a two variables equation involving a numerical integration](https://discourse.julialang.org/t/roots-of-a-two-variables-equation-involving-a-numerical-integration/37544)

<div class="topic-metadata">

**Author:** [@Daniel\_Tamayo](https://discourse.julialang.org/u/Daniel_Tamayo)\
**Replies:** 2\
**Last updated:** [April 14, 2020, 5:25am UTC](https://discourse.julialang.org/t/roots-of-a-two-variables-equation-involving-a-numerical-integration/37544 "2020-04-14T05:25:02Z")

</div>

I’m in troubles to find the zeros of the next equation of two variables: (w - k)A + B = 0 The issue is that the terms ‘A’ and ‘B’ are not numbers but are integral of certain functions ‘f(k,w,p)’ and ‘g(k,w,p)’ involvin…

---

## [Getting at the parameters from each step of optimization](https://discourse.julialang.org/t/getting-at-the-parameters-from-each-step-of-optimization/37539)

<div class="topic-metadata">

**Author:** [@donkeysaddle](https://discourse.julialang.org/u/donkeysaddle)\
**Replies:** 2\
**Last updated:** [April 14, 2020, 2:19am UTC](https://discourse.julialang.org/t/getting-at-the-parameters-from-each-step-of-optimization/37539 "2020-04-14T02:19:51Z")

</div>

Is there an easy way to access/pull the elements stored in the “extended” trace of the output of Optim.optimize()? I’d like to have a matrix, or an array of arrays, where the ith column (or row) is the ith set of parame…

---

## [Generic Function to train NN w/ Flux](https://discourse.julialang.org/t/generic-function-to-train-nn-w-flux/37208)

<div class="topic-metadata">

**Author:** [@Albert\_Zevelev](https://discourse.julialang.org/u/Albert_Zevelev)\
**Replies:** 7\
**Last updated:** [April 14, 2020, 3:47am UTC](https://discourse.julialang.org/t/generic-function-to-train-nn-w-flux/37208 "2020-04-14T03:47:30Z")

</div>

Updated: I would like to write a generic function to train a model in Flux. An ordinary linear regression w/ intercept is a special case of a neural network. If the optimizers work well I should get the same result (es…

---

## [Issues with For Loop - Appending New DataFrames](https://discourse.julialang.org/t/issues-with-for-loop-appending-new-dataframes/37534)

<div class="topic-metadata">

**Author:** [@aedunn12](https://discourse.julialang.org/u/aedunn12)\
**Replies:** 1\
**Last updated:** [April 13, 2020, 11:41pm UTC](https://discourse.julialang.org/t/issues-with-for-loop-appending-new-dataframes/37534 "2020-04-13T23:41:23Z")

</div>

Hello! I’m trying to run a pretty simple for loop. The premise is that I have a dataframe with 250 different subjects with time points over a number of different dates/times. The issue is that I need my my time to be seq…

---

## [Franklin deployment problems](https://discourse.julialang.org/t/franklin-deployment-problems/37519)

<div class="topic-metadata">

**Author:** [@KajWiik](https://discourse.julialang.org/u/KajWiik)\
**Replies:** 11\
**Last updated:** [April 13, 2020, 9:49pm UTC](https://discourse.julialang.org/t/franklin-deployment-problems/37519 "2020-04-13T21:49:41Z")

</div>

I have a locally working Franklin website and have difficulties in deploying it to github. I have tried both with the current documentation and https://github.com/tlienart/Franklin.jl/issues/390 The problem seems to be …

---

## [How NASA could have prevented a $200m crash with Julia's type system](https://discourse.julialang.org/t/how-nasa-could-have-prevented-a-200m-crash-with-julias-type-system/37496)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 5\
**Last updated:** [April 13, 2020, 9:42pm UTC](https://discourse.julialang.org/t/how-nasa-could-have-prevented-a-200m-crash-with-julias-type-system/37496 "2020-04-13T21:42:05Z")

</div>

It’s my first data science-related youtube video. I had some fun making it.

---

## [Grid layout for multiple plots](https://discourse.julialang.org/t/grid-layout-for-multiple-plots/37528)

<div class="topic-metadata">

**Author:** [@Farhan\_Samir](https://discourse.julialang.org/u/Farhan_Samir)\
**Replies:** 2\
**Last updated:** [April 13, 2020, 8:42pm UTC](https://discourse.julialang.org/t/grid-layout-for-multiple-plots/37528 "2020-04-13T20:42:54Z")

</div>

Hi, I’m trying to create a 2 by 10 grid of plots. The Plots documentation provides an example for a 2x2 grid: plot(rand(10,4), layout=grid(2,2),ticks=nothing) However, extending this to plot(rand(10,20),layout=grid(2…

---

## [ForwardDiff cannot assign ForwardDiff.Dual to input array](https://discourse.julialang.org/t/forwarddiff-cannot-assign-forwarddiff-dual-to-input-array/37522)

<div class="topic-metadata">

**Author:** [@Hudler](https://discourse.julialang.org/u/Hudler)\
**Replies:** 5\
**Last updated:** [April 13, 2020, 8:38pm UTC](https://discourse.julialang.org/t/forwarddiff-cannot-assign-forwarddiff-dual-to-input-array/37522 "2020-04-13T20:38:22Z")

</div>

Hi, I am trying to solve a following problem. I have an objective function that gets some initial parameters (init in the example) and metaparameter(s) (meta in example). The parameters are then updated w.r.t. metaparam…

---

## [Using kwargs and non kwargs in a function call](https://discourse.julialang.org/t/using-kwargs-and-non-kwargs-in-a-function-call/37518)

<div class="topic-metadata">

**Author:** [@birodaniel8](https://discourse.julialang.org/u/birodaniel8)\
**Replies:** 5\
**Last updated:** [April 13, 2020, 8:33pm UTC](https://discourse.julialang.org/t/using-kwargs-and-non-kwargs-in-a-function-call/37518 "2020-04-13T20:33:51Z")

</div>

Hi al, I am new at programming in Julia, but I am struggling to implement and call a function in a particular way, which I was using a lot in Python. I have a function like: function f(x, y=1, z=3; kwargs...) retur…

---

## [Is changing an error message in a package a breaking change?](https://discourse.julialang.org/t/is-changing-an-error-message-in-a-package-a-breaking-change/37499)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 5\
**Last updated:** [April 13, 2020, 7:40pm UTC](https://discourse.julialang.org/t/is-changing-an-error-message-in-a-package-a-breaking-change/37499 "2020-04-13T19:40:46Z")

</div>

Let’s say that I have a module julia\> module a f(x::Int) = x \>= 0 ? √x : error("negative") end Main.a that I subsequently release as a package. Now an user writes a code that specifically relies on the er…

---

## [New project](https://discourse.julialang.org/t/new-project/37425)

<div class="topic-metadata">

**Author:** [@Angshuman\_Podder](https://discourse.julialang.org/u/Angshuman_Podder)\
**Replies:** 6\
**Last updated:** [April 13, 2020, 7:05pm UTC](https://discourse.julialang.org/t/new-project/37425 "2020-04-13T19:05:49Z")

</div>

Hi, I just started with Julia after migrating from Matlab. I am wondering how to go about it. I have currently Julia installed and running in my windows terminal plus VS code. I want to know how to have a workspace windo…

---

## [I don't understand why this code is not working](https://discourse.julialang.org/t/i-dont-understand-why-this-code-is-not-working/37524)

<div class="topic-metadata">

**Author:** [@Nimpa](https://discourse.julialang.org/u/Nimpa)\
**Replies:** 1\
**Last updated:** [April 13, 2020, 6:49pm UTC](https://discourse.julialang.org/t/i-dont-understand-why-this-code-is-not-working/37524 "2020-04-13T18:49:04Z")

</div>

The function below is to calculate the fibonacci sequence using get! but i don’t understand why it is not working. global fib\_cache = Dict{BigInt, BigInt}(0 =\> 0, 1 =\> 1) function fib(n::Integer) global fib\_cache get…

---

## [Complex admittance matrix in PowerModels.jl?](https://discourse.julialang.org/t/complex-admittance-matrix-in-powermodels-jl/36717)

<div class="topic-metadata">

**Author:** [@RibeiroRaul](https://discourse.julialang.org/u/RibeiroRaul)\
**Replies:** 2\
**Last updated:** [April 13, 2020, 2:51pm UTC](https://discourse.julialang.org/t/complex-admittance-matrix-in-powermodels-jl/36717 "2020-04-13T14:51:59Z")

</div>

Hi, Is there a function that retrieves the complex admittance matrix from a PowerModels dict. Even though there is a type AdmittanceMatrix, it seems that it only receives susceptance matrix from calc\_susceptance\_matrix…

---

## [Julia vscode stop working when there are many source file and include statements](https://discourse.julialang.org/t/julia-vscode-stop-working-when-there-are-many-source-file-and-include-statements/36724)

<div class="topic-metadata">

**Author:** [@Patrick\_Chow](https://discourse.julialang.org/u/Patrick_Chow)\
**Replies:** 11\
**Last updated:** [April 13, 2020, 2:19pm UTC](https://discourse.julialang.org/t/julia-vscode-stop-working-when-there-are-many-source-file-and-include-statements/36724 "2020-04-13T14:19:24Z")

</div>

Hi, I am using julia 1.4.0 and julia vscode 0.15.18. Everything is working great when I have only 1 - 2 files in my project. When there are more files, say 6-7 and I use “include” in those file. It appear that julia vsc…

---

## [Anonymous function in function closure](https://discourse.julialang.org/t/anonymous-function-in-function-closure/37504)

<div class="topic-metadata">

**Author:** [@egcjm](https://discourse.julialang.org/u/egcjm)\
**Replies:** 3\
**Last updated:** [April 13, 2020, 2:10pm UTC](https://discourse.julialang.org/t/anonymous-function-in-function-closure/37504 "2020-04-13T14:10:41Z")

</div>

Consider the following simple code: function myclass(x) h() = 1 + x g() = 2 + x () -\> (h,g) end I understand x = 1 a = myclass(x) a() # (\>h, \>g) a()\[1\]() == 2 # = true as…

---

## [String and list](https://discourse.julialang.org/t/string-and-list/37464)

<div class="topic-metadata">

**Author:** [@Marques](https://discourse.julialang.org/u/Marques)\
**Replies:** 4\
**Last updated:** [April 13, 2020, 12:14pm UTC](https://discourse.julialang.org/t/string-and-list/37464 "2020-04-13T12:14:38Z")

</div>

Hi guys. I searched but I couldn’t find the answer. I would like to know how to invert the reading mode, for example in python if you have the phrase = “lua”, just make the phrase \[-1: -4: -1\], and the result would be au…

---

## [Verify a matrix is positive semi-definite](https://discourse.julialang.org/t/verify-a-matrix-is-positive-semi-definite/23329)

<div class="topic-metadata">

**Author:** [@Mr.Robot](https://discourse.julialang.org/u/Mr.Robot)\
**Replies:** 13\
**Last updated:** [April 13, 2020, 12:04pm UTC](https://discourse.julialang.org/t/verify-a-matrix-is-positive-semi-definite/23329 "2020-04-13T12:04:00Z")

</div>

I am trying to numerically verify that A symmetric matrix \\mathbf{A} is positive semidefinite if and only if it is a covariance matrix. Then I need to verify in both directions, i.e. Given a positive semidefinite m…

---

## [ML for optimal power flow](https://discourse.julialang.org/t/ml-for-optimal-power-flow/37501)

<div class="topic-metadata">

**Author:** [@Mariana](https://discourse.julialang.org/u/Mariana)\
**Replies:** 0\
**Last updated:** [April 13, 2020, 11:53am UTC](https://discourse.julialang.org/t/ml-for-optimal-power-flow/37501 "2020-04-13T11:53:24Z")

</div>

I’d like to use neural networks to estimate some variable on an optimal power flow problem. For example, I’d like to estimate the power flow on transmission lines, given the system topology (generation, demand, line para…

---

## [Plea to package developers regarding documentation!](https://discourse.julialang.org/t/plea-to-package-developers-regarding-documentation/37473)

<div class="topic-metadata">

**Author:** [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Replies:** 9\
**Last updated:** [April 13, 2020, 10:06am UTC](https://discourse.julialang.org/t/plea-to-package-developers-regarding-documentation/37473 "2020-04-13T10:06:33Z")

</div>

Very serious topic ahead: Please please please can package developers put a link BACK to the source repo inside your documentation! Without it, the documentation becomes a trap. Randomly selected example: StatsBase.jl …

---

## [Huge sparse array construction](https://discourse.julialang.org/t/huge-sparse-array-construction/37459)

<div class="topic-metadata">

**Author:** [@AhmedAlreweny](https://discourse.julialang.org/u/AhmedAlreweny)\
**Replies:** 9\
**Last updated:** [April 12, 2020, 11:25pm UTC](https://discourse.julialang.org/t/huge-sparse-array-construction/37459 "2020-04-12T23:25:49Z")

</div>

Hello, I have a huge sparse matrix (1 million x 1 million) which I am trying to efficiently construct. I am using the following code: D\_matrix = sparse(I, J, V) dropzeros!(D\_matrix,trim = true) Where I,J and V are ver…

---

## [The big difference in speed of remainder calculations](https://discourse.julialang.org/t/the-big-difference-in-speed-of-remainder-calculations/37401)

<div class="topic-metadata">

**Author:** [@likein12](https://discourse.julialang.org/u/likein12)\
**Replies:** 13\
**Last updated:** [April 13, 2020, 8:00am UTC](https://discourse.julialang.org/t/the-big-difference-in-speed-of-remainder-calculations/37401 "2020-04-13T08:00:58Z")

</div>

I found a curious behavior in Julia. When I ran the codes below, big difference in speed was observed. Code 1 function main() a = 0 p = 2^5 N = 100000000 for i in 1:N a %= p end println(a…

---

## [How to collect keyword arguments in a Dict?](https://discourse.julialang.org/t/how-to-collect-keyword-arguments-in-a-dict/6693)

<div class="topic-metadata">

**Author:** [@ksmet1977](https://discourse.julialang.org/u/ksmet1977)\
**Replies:** 9\
**Last updated:** [April 13, 2020, 8:04am UTC](https://discourse.julialang.org/t/how-to-collect-keyword-arguments-in-a-dict/6693 "2020-04-13T08:04:55Z")

</div>

How can I get the keyword arguments and their default values of a function in a dict in Julia? E.g: function foo(x; a = 1, b = 2, c= 3) # How do I get a dict of keyword arguments: Dict(a=\>1, b=\>2,c=3) ??, # so I ca…

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

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