# Latest

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

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

**Page:** 1528

---

## [KeyError: key "\_\_div\_\_" not found, and IOError: unlink](https://discourse.julialang.org/t/keyerror-key-div-not-found-and-ioerror-unlink/53044)

<div class="topic-metadata">

**Author:** [@rumil](https://discourse.julialang.org/u/rumil)\
**Replies:** 0\
**Last updated:** [January 8, 2021, 2:42pm UTC](https://discourse.julialang.org/t/keyerror-key-div-not-found-and-ioerror-unlink/53044 "2021-01-08T14:42:44Z")

</div>

Hi, I’m quite new to Julia and currently have some trouble getting the Julia Pandas package to work. I’m using Julia 1.5.3, Python 3.7.9, and installed pandas 1.2.0 for Python. Using pandas via PyCall is no problem, bu…

---

## [PrettyTables.jl: @ptconf tf argument not able to find custom tf](https://discourse.julialang.org/t/prettytables-jl-ptconf-tf-argument-not-able-to-find-custom-tf/52824)

<div class="topic-metadata">

**Author:** [@alasaadstat](https://discourse.julialang.org/u/alasaadstat)\
**Replies:** 3\
**Last updated:** [January 8, 2021, 2:27pm UTC](https://discourse.julialang.org/t/prettytables-jl-ptconf-tf-argument-not-able-to-find-custom-tf/52824 "2021-01-08T14:27:04Z")

</div>

Hi, I’m currently using PrettyTables, and I’m not sure what’s going on with my codes below. I defined a custom tf as follows: using JuliaDB using PrettyTables tf\_compact2 = TextFormat(up\_right\_corner = '─', …

---

## [Adding (simple) user-defined functions causes significant slowdown in JuMP + Ipopt](https://discourse.julialang.org/t/adding-simple-user-defined-functions-causes-significant-slowdown-in-jump-ipopt/52971)

<div class="topic-metadata">

**Author:** [@boranzhao](https://discourse.julialang.org/u/boranzhao)\
**Replies:** 4\
**Last updated:** [January 8, 2021, 2:17pm UTC](https://discourse.julialang.org/t/adding-simple-user-defined-functions-causes-significant-slowdown-in-jump-ipopt/52971 "2021-01-08T14:17:57Z")

</div>

Hello, I created a nonlinear programming problem (for model predictive control) using JuMP, and solved it using Ipopt. However, I found that, if I included an (even very simple) user-defined function in the defining th…

---

## [Macro for plotting simple curves](https://discourse.julialang.org/t/macro-for-plotting-simple-curves/47623)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 21\
**Last updated:** [January 8, 2021, 1:44pm UTC](https://discourse.julialang.org/t/macro-for-plotting-simple-curves/47623 "2021-01-08T13:44:19Z")

</div>

Do any of the plotting packages have a macro for plotting simple curves? I’m looking for something like this: # plot the curve from x=-10 to x=10 @curve(x^3 - 6x^2 + 4x + 12, -10, 10) Basically, I’m looking for somethi…

---

## [Gradient of NN with respect to inputs](https://discourse.julialang.org/t/gradient-of-nn-with-respect-to-inputs/53037)

<div class="topic-metadata">

**Author:** [@Sunny](https://discourse.julialang.org/u/Sunny)\
**Replies:** 1\
**Last updated:** [January 8, 2021, 1:21pm UTC](https://discourse.julialang.org/t/gradient-of-nn-with-respect-to-inputs/53037 "2021-01-08T13:21:46Z")

</div>

I want to take a gradient of NN but get the error MethodError: no method matching extract\_gradient!(::Type{ForwardDiff.Tag{Chain{Tuple{Dense{typeof(relu),Array{Float32,2},Array{Float32,1}},Dense{typeof(identity),Array{F…

---

## [Constant type semantics](https://discourse.julialang.org/t/constant-type-semantics/53028)

<div class="topic-metadata">

**Author:** [@akalinin](https://discourse.julialang.org/u/akalinin)\
**Replies:** 2\
**Last updated:** [January 8, 2021, 9:41am UTC](https://discourse.julialang.org/t/constant-type-semantics/53028 "2021-01-08T09:41:32Z")

</div>

Consider we have some abstract type abstract type Point{T, N} end What is the main difference between Point3{T} = Point{T, 3} and const Point3{T} = Point{T, 3} What is the const modificator meaning related to the t…

---

## [Is there a way to modify captured variables in a closure?](https://discourse.julialang.org/t/is-there-a-way-to-modify-captured-variables-in-a-closure/31213)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 15\
**Last updated:** [January 8, 2021, 9:05am UTC](https://discourse.julialang.org/t/is-there-a-way-to-modify-captured-variables-in-a-closure/31213 "2021-01-08T09:05:59Z")

</div>

Suppose I have some closure like, f = let x = 2 () -\> x^2 end Is there some way to create a new closure from this where I modify the type and value of x? Something like, g = deepcopy(f) g.x = "2" g() # would give …

---

## [Silly SymPy question](https://discourse.julialang.org/t/silly-sympy-question/52936)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 7\
**Last updated:** [January 8, 2021, 8:34am UTC](https://discourse.julialang.org/t/silly-sympy-question/52936 "2021-01-08T08:34:29Z")

</div>

I want to convert some symbolic computations from Maple to Julia/SymPy, specifically regarding the Park transformation. Question: how do I use coefficients like sqrt(3/2) and make sure that these are preserved as exact …

---

## [Loading functions defined in .jl file to jupyter notebook](https://discourse.julialang.org/t/loading-functions-defined-in-jl-file-to-jupyter-notebook/52444)

<div class="topic-metadata">

**Author:** [@tgautam03](https://discourse.julialang.org/u/tgautam03)\
**Replies:** 8\
**Last updated:** [January 8, 2021, 8:25am UTC](https://discourse.julialang.org/t/loading-functions-defined-in-jl-file-to-jupyter-notebook/52444 "2021-01-08T08:25:15Z")

</div>

Hi, I’ve defined a .jl file with several functions and I want to use them to do some calculations in jupyter notebook. I tried using include("../src/LinAL.jl") but it gives an error could not open file /home/tushar/dev/…

---

## [Indexing arrays of strings (finding duplicates)](https://discourse.julialang.org/t/indexing-arrays-of-strings-finding-duplicates/53023)

<div class="topic-metadata">

**Author:** [@graham](https://discourse.julialang.org/u/graham)\
**Replies:** 10\
**Last updated:** [January 8, 2021, 8:08am UTC](https://discourse.julialang.org/t/indexing-arrays-of-strings-finding-duplicates/53023 "2021-01-08T08:08:51Z")

</div>

Hello all, I’m looking to find duplicates within an array (an exercise from the Think Julia text). I’ve got it working for numerical values, but not sure how to generalize to strings as well. Parse? Find? function has…

---

## [Union Type vs Inheritance from Abstract Type](https://discourse.julialang.org/t/union-type-vs-inheritance-from-abstract-type/53000)

<div class="topic-metadata">

**Author:** [@ykkan](https://discourse.julialang.org/u/ykkan)\
**Replies:** 9\
**Last updated:** [January 8, 2021, 6:26am UTC](https://discourse.julialang.org/t/union-type-vs-inheritance-from-abstract-type/53000 "2021-01-08T06:26:41Z")

</div>

If I have several structures: struct Child1{N,T} end struct Child2{T} end const Child1OrChild2{N,T} = Union{Child1{N,T}, Child2{T}} struct Mother{M,N,T} children::NTuple{M,Child1OrChild2{N,T}} end Would it be possi…

---

## [Lack of stable PostgreSQL-communication a major showstopper](https://discourse.julialang.org/t/lack-of-stable-postgresql-communication-a-major-showstopper/6934)

<div class="topic-metadata">

**Author:** [@johann.spies](https://discourse.julialang.org/u/johann.spies)\
**Replies:** 33\
**Last updated:** [January 8, 2021, 5:48am UTC](https://discourse.julialang.org/t/lack-of-stable-postgresql-communication-a-major-showstopper/6934 "2021-01-08T05:48:37Z")

</div>

I am beginning to enjoy Julia and actually succeeded in doing some useful stuff as I learn the language. I was hoping to replace what I am presently doing in Python with Julia. But I do a lot of database work and needs…

---

## [Why is deepcopy() -ing Sets slower than Arrays of the same size?](https://discourse.julialang.org/t/why-is-deepcopy-ing-sets-slower-than-arrays-of-the-same-size/53020)

<div class="topic-metadata">

**Author:** [@bsuwal](https://discourse.julialang.org/u/bsuwal)\
**Replies:** 4\
**Last updated:** [January 8, 2021, 3:23am UTC](https://discourse.julialang.org/t/why-is-deepcopy-ing-sets-slower-than-arrays-of-the-same-size/53020 "2021-01-08T03:23:39Z")

</div>

I have the following code: function deepcopy\_n\_times(obj::Set{Int}, n::Int) for i in 1:n deepcopy(obj) end end function deepcopy\_n\_times(obj::Array{Int, 1}, n::Int) for i in 1:n deepcopy(obj…

---

## [Are there Julia operational semantics available?](https://discourse.julialang.org/t/are-there-julia-operational-semantics-available/52923)

<div class="topic-metadata">

**Author:** [@0x0f0f0f](https://discourse.julialang.org/u/0x0f0f0f)\
**Replies:** 4\
**Last updated:** [January 8, 2021, 12:59am UTC](https://discourse.julialang.org/t/are-there-julia-operational-semantics-available/52923 "2021-01-08T00:59:09Z")

</div>

I am interested in using Julia for my thesis. Is there any formal system backing Julia’s semantics? At least the core language? For example, in other languages:

---

## [Function factories or callable structs?](https://discourse.julialang.org/t/function-factories-or-callable-structs/52987)

<div class="topic-metadata">

**Author:** [@jlbosse](https://discourse.julialang.org/u/jlbosse)\
**Replies:** 10\
**Last updated:** [January 8, 2021, 12:16am UTC](https://discourse.julialang.org/t/function-factories-or-callable-structs/52987 "2021-01-08T00:16:33Z")

</div>

I want to create parametric functions and see two ways of doing that: Function factory method julia\> function createAdder(a) function adder(b) a+b end end julia\> plus4 = cre…

---

## [How can I project level curves onto the axis planes in 3d?](https://discourse.julialang.org/t/how-can-i-project-level-curves-onto-the-axis-planes-in-3d/53016)

<div class="topic-metadata">

**Author:** [@phdemetri](https://discourse.julialang.org/u/phdemetri)\
**Replies:** 0\
**Last updated:** [January 7, 2021, 11:51pm UTC](https://discourse.julialang.org/t/how-can-i-project-level-curves-onto-the-axis-planes-in-3d/53016 "2021-01-07T23:51:52Z")

</div>

I’m interested in plotting the level curves of a surface onto the xy plane. Here is an example of what I want to achieve I’ve got some code to make the surface and plot it already. How can I modify my code to get m…

---

## [From Julia version 1.0 to 1.5](https://discourse.julialang.org/t/from-julia-version-1-0-to-1-5/52631)

<div class="topic-metadata">

**Author:** [@jjdegruijter](https://discourse.julialang.org/u/jjdegruijter)\
**Replies:** 10\
**Last updated:** [January 7, 2021, 11:04pm UTC](https://discourse.julialang.org/t/from-julia-version-1-0-to-1-5/52631 "2021-01-07T23:04:06Z")

</div>

I downloaded Julia version 1.5.3 after having used version1.0.4 via Atom till now. How can I start using 1.5.3 with Atom? Or is a different shell more suitable?

---

## [Has Moderna used Pumas AI for mRNA modeling and simulation?](https://discourse.julialang.org/t/has-moderna-used-pumas-ai-for-mrna-modeling-and-simulation/53004)

<div class="topic-metadata">

**Author:** [@empet](https://discourse.julialang.org/u/empet)\
**Replies:** 1\
**Last updated:** [January 7, 2021, 10:57pm UTC](https://discourse.julialang.org/t/has-moderna-used-pumas-ai-for-mrna-modeling-and-simulation/53004 "2021-01-07T22:57:56Z")

</div>

A few days ago, I saw a Julia related tweet announcing that Pumas AI was involved in modeling and simulating Moderna’s mRNA. In a discussion with a friend about Julia vs Python I told him this news, but when I was aske…

---

## [Keybindings in VS Code Julia REPL](https://discourse.julialang.org/t/keybindings-in-vs-code-julia-repl/53014)

<div class="topic-metadata">

**Author:** [@grahamas](https://discourse.julialang.org/u/grahamas)\
**Replies:** 0\
**Last updated:** [January 7, 2021, 10:51pm UTC](https://discourse.julialang.org/t/keybindings-in-vs-code-julia-repl/53014 "2021-01-07T22:51:36Z")

</div>

Does anyone know how to/if it’s possible to use keyboard shortcuts in the VS Code Julia REPL? I’d like to press Ctrl-K to delete the line like I do in my normal terminal emulator (or Shift-Ctrl-U analogous as in the edit…

---

## [Early stopping with Optim when the validation loss increases](https://discourse.julialang.org/t/early-stopping-with-optim-when-the-validation-loss-increases/53008)

<div class="topic-metadata">

**Author:** [@sobhan](https://discourse.julialang.org/u/sobhan)\
**Replies:** 1\
**Last updated:** [January 7, 2021, 10:17pm UTC](https://discourse.julialang.org/t/early-stopping-with-optim-when-the-validation-loss-increases/53008 "2021-01-07T22:17:56Z")

</div>

I’m using Optim.jl to train a model but it keeps overfiting. is there nice way of implementing a early stopping callback that has the current x? I tried setting the callback in Optim.Options but i only get the iteration…

---

## [Workflow to create and update \[compat\] section of Project.toml](https://discourse.julialang.org/t/workflow-to-create-and-update-compat-section-of-project-toml/53005)

<div class="topic-metadata">

**Author:** [@Gregstrq](https://discourse.julialang.org/u/Gregstrq)\
**Replies:** 5\
**Last updated:** [January 7, 2021, 10:13pm UTC](https://discourse.julialang.org/t/workflow-to-create-and-update-compat-section-of-project-toml/53005 "2021-01-07T22:13:42Z")

</div>

What is the preferred workflow to create the \[compat\] section for a new package, and then maintain it up to date? Creating Can you tell if the following algorithm for creation of \[compat\] section is reasonable: Creat…

---

## [Running a code block in Juno?](https://discourse.julialang.org/t/running-a-code-block-in-juno/53010)

<div class="topic-metadata">

**Author:** [@Michael\_Barmann](https://discourse.julialang.org/u/Michael_Barmann)\
**Replies:** 2\
**Last updated:** [January 7, 2021, 10:08pm UTC](https://discourse.julialang.org/t/running-a-code-block-in-juno/53010 "2021-01-07T22:08:03Z")

</div>

Is there a way (such as a keystroke) to run a “cell” (or “block”) of code in Juno? For example, when using Spyder for Python, one can use the symbol #&& to create a “cell”. Clicking inside of that cell and using Ctrl+Ent…

---

## [JuliaPro with VS Code?](https://discourse.julialang.org/t/juliapro-with-vs-code/41780)

<div class="topic-metadata">

**Author:** [@braamvandyk](https://discourse.julialang.org/u/braamvandyk)\
**Replies:** 5\
**Last updated:** [January 7, 2021, 9:32pm UTC](https://discourse.julialang.org/t/juliapro-with-vs-code/41780 "2021-01-07T21:32:15Z")

</div>

With the IDE focus now mostly on VS Code, as opposed to Atom/Juno, will future versions of Julia Pro ship with VS Code instead?

---

## [What happens if two packages require each other?](https://discourse.julialang.org/t/what-happens-if-two-packages-require-each-other/3108)

<div class="topic-metadata">

**Author:** [@djsegal](https://discourse.julialang.org/u/djsegal)\
**Replies:** 9\
**Last updated:** [January 7, 2021, 9:27pm UTC](https://discourse.julialang.org/t/what-happens-if-two-packages-require-each-other/3108 "2021-01-07T21:27:30Z")

</div>

Has this chicken & the egg problem already been resolved? edit: for clarity, this could be: shallow mutual requiring ( a deps on b && b deps on a ) or requiring each other through some intermediary packages ( a deps…

---

## [Installation problem on MacOS Big Sur](https://discourse.julialang.org/t/installation-problem-on-macos-big-sur/53009)

<div class="topic-metadata">

**Author:** [@RonnieC](https://discourse.julialang.org/u/RonnieC)\
**Replies:** 1\
**Last updated:** [January 7, 2021, 9:03pm UTC](https://discourse.julialang.org/t/installation-problem-on-macos-big-sur/53009 "2021-01-07T21:03:26Z")

</div>

I tried to install Julia 1.5 on MacOS Big Sur. For some reason, it did not work. Here is what I did: I downloaded Julia 1.5, and then clicked on the Julia icon to put it in my application folder. A dialogue came out to…

---

## [Does Project.toml for tests directory need a \[compat\] section?](https://discourse.julialang.org/t/does-project-toml-for-tests-directory-need-a-compat-section/53002)

<div class="topic-metadata">

**Author:** [@Gregstrq](https://discourse.julialang.org/u/Gregstrq)\
**Replies:** 1\
**Last updated:** [January 7, 2021, 7:25pm UTC](https://discourse.julialang.org/t/does-project-toml-for-tests-directory-need-a-compat-section/53002 "2021-01-07T19:25:24Z")

</div>

Let’s say I specify test dependencies in special “name\_of\_package/test/Project.toml” file. Does it need to have a separate \[compat\] section? Can the compatibility versions differ from the ones in the main “Project.toml”…

---

## [Launching with JULIA\_NUM\_THREADS=\<max\>](https://discourse.julialang.org/t/launching-with-julia-num-threads-max/52964)

<div class="topic-metadata">

**Author:** [@mkarikom](https://discourse.julialang.org/u/mkarikom)\
**Replies:** 2\
**Last updated:** [January 7, 2021, 6:17pm UTC](https://discourse.julialang.org/t/launching-with-julia-num-threads-max/52964 "2021-01-07T18:17:11Z")

</div>

Is there any drawback to always launching julia with the number of existing cpu cores? Suppose my cpu has 4 cores, and I need to do some non-production stuff like debugging, etc: # cpu with 4 cores firefox & export JUL…

---

## [Do \`@propagate\_inbounds\` stack together?](https://discourse.julialang.org/t/do-propagate-inbounds-stack-together/52996)

<div class="topic-metadata">

**Author:** [@Gregstrq](https://discourse.julialang.org/u/Gregstrq)\
**Replies:** 1\
**Last updated:** [January 7, 2021, 5:17pm UTC](https://discourse.julialang.org/t/do-propagate-inbounds-stack-together/52996 "2021-01-07T17:17:10Z")

</div>

The documentation says that @propagate\_inbounds add additional layer of inlining for eliding @boundscheck blocks. That means, that if you have more than two levels of inlining, eliding does not work. If the function at …

---

## [How to adjust string into item in JSON structure](https://discourse.julialang.org/t/how-to-adjust-string-into-item-in-json-structure/52988)

<div class="topic-metadata">

**Author:** [@Laco\_Kovac](https://discourse.julialang.org/u/Laco_Kovac)\
**Replies:** 3\
**Last updated:** [January 7, 2021, 4:57pm UTC](https://discourse.julialang.org/t/how-to-adjust-string-into-item-in-json-structure/52988 "2021-01-07T16:57:27Z")

</div>

My code is validating input json using JSONSchema.isvalid If it is not valid, code takes string returned by JSONSchema.diagnose and it should return that string as json containing error. The code looks like this: dia…

---

## [Efficient reshaping of 2D array by pairs of columns](https://discourse.julialang.org/t/efficient-reshaping-of-2d-array-by-pairs-of-columns/52953)

<div class="topic-metadata">

**Author:** [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)\
**Replies:** 9\
**Last updated:** [January 7, 2021, 4:56pm UTC](https://discourse.julialang.org/t/efficient-reshaping-of-2d-array-by-pairs-of-columns/52953 "2021-01-07T16:56:28Z")

</div>

Hi, I’m building up an MC code that has to run fast and efficiently. At one step I need to reshape a large array with two columns into an array with much less columns and many more rows. A very simple example woudl be t…

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

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