# Latest

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

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

**Page:** 1650

---

## [Modifying REPL key bindings](https://discourse.julialang.org/t/modifying-repl-key-bindings/45505)

<div class="topic-metadata">

**Author:** [@hendri54](https://discourse.julialang.org/u/hendri54)\
**Replies:** 0\
**Last updated:** [August 25, 2020, 2:09pm UTC](https://discourse.julialang.org/t/modifying-repl-key-bindings/45505 "2020-08-25T14:09:36Z")

</div>

Is there a convenient way of redefining REPL key bindings? The documentation suggests " Users should refer to LineEdit.jl to discover the available actions on key input." Is there perhaps a package that makes this easi…

---

## [How to change legends place with Plots, gr()?](https://discourse.julialang.org/t/how-to-change-legends-place-with-plots-gr/7294)

<div class="topic-metadata">

**Author:** [@cserteGT3](https://discourse.julialang.org/u/cserteGT3)\
**Replies:** 26\
**Last updated:** [August 25, 2020, 10:46am UTC](https://discourse.julialang.org/t/how-to-change-legends-place-with-plots-gr/7294 "2020-08-25T10:46:12Z")

</div>

I’m using Plots and GR, and can’t find a way to change the legends location in a plot. As I understand currently I can’t do it with Plots, there’s no keyword argument for it (correct me if I’m wrong). Can someone please…

---

## [Package interface best practice: More functions or more arguments?](https://discourse.julialang.org/t/package-interface-best-practice-more-functions-or-more-arguments/45452)

<div class="topic-metadata">

**Author:** [@danielw2904](https://discourse.julialang.org/u/danielw2904)\
**Replies:** 3\
**Last updated:** [August 25, 2020, 7:57am UTC](https://discourse.julialang.org/t/package-interface-best-practice-more-functions-or-more-arguments/45452 "2020-08-25T07:57:06Z")

</div>

For my package JSONLines.jl I am considering a refactoring and provide 3 options to read a JSONLines file: Iterator over an mmaped file. Basically returns the mmaped file at first and implements an iterator that produc…

---

## [Reset Julia REPL](https://discourse.julialang.org/t/reset-julia-repl/45489)

<div class="topic-metadata">

**Author:** [@conditionality](https://discourse.julialang.org/u/conditionality)\
**Replies:** 1\
**Last updated:** [August 25, 2020, 7:45am UTC](https://discourse.julialang.org/t/reset-julia-repl/45489 "2020-08-25T07:45:35Z")

</div>

I have a script that uses a global variable. When experimenting I run the script via julia REPL by writing include(“myscript.jl”). This works fine the first time, but the second time I always get the message “WARNING: re…

---

## [Correct way of parallelizing on a HPC remote cluster machine](https://discourse.julialang.org/t/correct-way-of-parallelizing-on-a-hpc-remote-cluster-machine/45294)

<div class="topic-metadata">

**Author:** [@trathi](https://discourse.julialang.org/u/trathi)\
**Replies:** 8\
**Last updated:** [August 25, 2020, 3:08am UTC](https://discourse.julialang.org/t/correct-way-of-parallelizing-on-a-hpc-remote-cluster-machine/45294 "2020-08-25T03:08:09Z")

</div>

I want to know what is the correct way of running a julia script (which has some part that requires parallelization) on a HPC cluster remote machine. My PBS script looks like: #!/bin/bash -l #PBS -l walltime=01:00:00,n…

---

## [How to register a function with parameter in JuMP](https://discourse.julialang.org/t/how-to-register-a-function-with-parameter-in-jump/45457)

<div class="topic-metadata">

**Author:** [@Behemoth-s](https://discourse.julialang.org/u/Behemoth-s)\
**Replies:** 2\
**Last updated:** [August 25, 2020, 2:10am UTC](https://discourse.julialang.org/t/how-to-register-a-function-with-parameter-in-jump/45457 "2020-08-25T02:10:25Z")

</div>

Here I have some variables and parameters model = Model(Ipopt.Optimizer) @variable(model, x\[1:2\]) p = \[4, 6\] I want to register a function with parameter in JuMP to do something like this bellow. function f(x, p) …

---

## [Cygwin not displaying graphic characters correctly](https://discourse.julialang.org/t/cygwin-not-displaying-graphic-characters-correctly/38991)

<div class="topic-metadata">

**Author:** [@purplishrock](https://discourse.julialang.org/u/purplishrock)\
**Replies:** 1\
**Last updated:** [August 25, 2020, 1:51am UTC](https://discourse.julialang.org/t/cygwin-not-displaying-graphic-characters-correctly/38991 "2020-08-25T01:51:11Z")

</div>

This post will have a very small audience, but that audience will be very interested :slight\_smile: So i upgraded my cygwin and it broke character display in the julia repl. What was particularly annoying is that the d…

---

## [Taking zygote gradient on function with ! operator fails on gpu](https://discourse.julialang.org/t/taking-zygote-gradient-on-function-with-operator-fails-on-gpu/45481)

<div class="topic-metadata">

**Author:** [@reid](https://discourse.julialang.org/u/reid)\
**Replies:** 3\
**Last updated:** [August 25, 2020, 1:40am UTC](https://discourse.julialang.org/t/taking-zygote-gradient-on-function-with-operator-fails-on-gpu/45481 "2020-08-25T01:40:09Z")

</div>

ERROR: LoadError: MethodError: no method matching !(::ForwardDiff.Dual{Nothing,Bool,1}) Only happens on gpu, not cpu, which is really confusing me. MWE using Flux masksum(x,y) = sum(.!x \* y) gradient(masksum, \[true,…

---

## [Single-method function as a more re-evaluation-friendly \`const\`?](https://discourse.julialang.org/t/single-method-function-as-a-more-re-evaluation-friendly-const/45433)

<div class="topic-metadata">

**Author:** [@NHDaly](https://discourse.julialang.org/u/NHDaly)\
**Replies:** 10\
**Last updated:** [August 25, 2020, 12:10am UTC](https://discourse.julialang.org/t/single-method-function-as-a-more-re-evaluation-friendly-const/45433 "2020-08-25T00:10:01Z")

</div>

So i was thinking about some of the conversations we had at JuliaCon about Julia’s ability to handle redefining const variables, and i was wondering if we should just always prefer to use a single-method function instead…

---

## [Profiling compilation/inference](https://discourse.julialang.org/t/profiling-compilation-inference/44496)

<div class="topic-metadata">

**Author:** [@mhauru](https://discourse.julialang.org/u/mhauru)\
**Replies:** 10\
**Last updated:** [August 24, 2020, 10:07pm UTC](https://discourse.julialang.org/t/profiling-compilation-inference/44496 "2020-08-24T22:07:29Z")

</div>

I have a package for which running the test script results in around 20 minutes of compilation. Presumably somewhere in my package there’s something that’s giving inference a very hard time. I’ve done some work trying to…

---

## [Help with interpolation](https://discourse.julialang.org/t/help-with-interpolation/45474)

<div class="topic-metadata">

**Author:** [@acvalerio](https://discourse.julialang.org/u/acvalerio)\
**Replies:** 2\
**Last updated:** [August 24, 2020, 9:11pm UTC](https://discourse.julialang.org/t/help-with-interpolation/45474 "2020-08-24T21:11:05Z")

</div>

I’m looking for a function similar to interp1 in Matlab, and browsing the web I found the following piece of code that supposedly do the job: using Interpolations function interp1(X, V, Xq) knots = (X,) itp = in…

---

## [Defining a array type](https://discourse.julialang.org/t/defining-a-array-type/45472)

<div class="topic-metadata">

**Author:** [@Renan\_Rabelo](https://discourse.julialang.org/u/Renan_Rabelo)\
**Replies:** 7\
**Last updated:** [August 24, 2020, 8:49pm UTC](https://discourse.julialang.org/t/defining-a-array-type/45472 "2020-08-24T20:49:29Z")

</div>

Newbie question, but how can I define an array type (like Java or C)? I know is posible to do in local variables like: function f(X::Int64) Y::Int64 = 0 end How to define an array type? Thanks!

---

## [ANN: REPLHistory](https://discourse.julialang.org/t/ann-replhistory/45422)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 3\
**Last updated:** [August 24, 2020, 8:45pm UTC](https://discourse.julialang.org/t/ann-replhistory/45422 "2020-08-24T20:45:33Z")

</div>

Gain access to the Julia REPL history.

---

## [Onnx support for Julia ML frameworks](https://discourse.julialang.org/t/onnx-support-for-julia-ml-frameworks/9035)

<div class="topic-metadata">

**Author:** [@hgeorgako](https://discourse.julialang.org/u/hgeorgako)\
**Replies:** 9\
**Last updated:** [August 24, 2020, 8:35pm UTC](https://discourse.julialang.org/t/onnx-support-for-julia-ml-frameworks/9035 "2020-08-24T20:35:50Z")

</div>

This seems like it’s becoming a thing. https://onnx.ai/getting-started Any packages providing support for this?

---

## [Why doesn't empty array match any type signature for array?](https://discourse.julialang.org/t/why-doesnt-empty-array-match-any-type-signature-for-array/45465)

<div class="topic-metadata">

**Author:** [@purplishrock](https://discourse.julialang.org/u/purplishrock)\
**Replies:** 14\
**Last updated:** [August 24, 2020, 7:38pm UTC](https://discourse.julialang.org/t/why-doesnt-empty-array-match-any-type-signature-for-array/45465 "2020-08-24T19:38:25Z")

</div>

function foo(x::Tuple{Array{Float64,2}, String, Bool}) a, s, b = x if a != \[\] println(a) end end function main() foo((\[\], "", false)) end main() ERROR: LoadError: MethodError: no method matchin…

---

## [Error using GLM and Distributed](https://discourse.julialang.org/t/error-using-glm-and-distributed/45459)

<div class="topic-metadata">

**Author:** [@drarnau](https://discourse.julialang.org/u/drarnau)\
**Replies:** 3\
**Last updated:** [August 24, 2020, 6:02pm UTC](https://discourse.julialang.org/t/error-using-glm-and-distributed/45459 "2020-08-24T18:02:46Z")

</div>

Dear all, I am trying to parallelise my code and I find this kind of problem. My not-parallelised code can be represented as: using DataFrames, GLM function foo(df::DataFrame) ols = lm(@formula(A ~ 1.0), df) …

---

## [Julia version dependency of a dependency](https://discourse.julialang.org/t/julia-version-dependency-of-a-dependency/45462)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 4\
**Last updated:** [August 24, 2020, 6:01pm UTC](https://discourse.julialang.org/t/julia-version-dependency-of-a-dependency/45462 "2020-08-24T18:01:09Z")

</div>

I created a package that I initially thought would work with Julia 1.0. When a student of mine installed it, he got an error, because a dependency of it (ThreadPools, specifically), required Julia 1.3. I then updated th…

---

## [Soss - Examples/tutorials](https://discourse.julialang.org/t/soss-examples-tutorials/45461)

<div class="topic-metadata">

**Author:** [@franco](https://discourse.julialang.org/u/franco)\
**Replies:** 2\
**Last updated:** [August 24, 2020, 5:46pm UTC](https://discourse.julialang.org/t/soss-examples-tutorials/45461 "2020-08-24T17:46:50Z")

</div>

I am moving a graduate course I teach on statistics from frequentist to Bayesian and from Python to Julia. I mostly work with Python in my day job and have only implemented some basic Bayesian models with PyMC3. I was l…

---

## [How to properly get coordinates with a ::Grid structure](https://discourse.julialang.org/t/how-to-properly-get-coordinates-with-a-grid-structure/45392)

<div class="topic-metadata">

**Author:** [@jmura](https://discourse.julialang.org/u/jmura)\
**Replies:** 1\
**Last updated:** [August 24, 2020, 4:35pm UTC](https://discourse.julialang.org/t/how-to-properly-get-coordinates-with-a-grid-structure/45392 "2020-08-24T16:35:13Z")

</div>

Dear all, I’m a newbie at Julia. Probably I’m doing something wrong and/or inefficiently: I was trying to replicate one of the examples to generate my own linear elasticity solver. Starting with a very simple example (f…

---

## [Filtering out extraneous info in jupyterlab git tracking](https://discourse.julialang.org/t/filtering-out-extraneous-info-in-jupyterlab-git-tracking/45460)

<div class="topic-metadata">

**Author:** [@samerb](https://discourse.julialang.org/u/samerb)\
**Replies:** 1\
**Last updated:** [August 24, 2020, 4:11pm UTC](https://discourse.julialang.org/t/filtering-out-extraneous-info-in-jupyterlab-git-tracking/45460 "2020-08-24T16:11:58Z")

</div>

I am hoping to use git to track my jupyter lab code. When I do that, git stores a bunch of extraneous data like how many times the cell was run and a bunch of other meta dta making the git file unreadable: Is there a…

---

## [How to add/subtract values in a dataframe or array column?](https://discourse.julialang.org/t/how-to-add-subtract-values-in-a-dataframe-or-array-column/45455)

<div class="topic-metadata">

**Author:** [@HelgavonLichtenstein](https://discourse.julialang.org/u/HelgavonLichtenstein)\
**Replies:** 5\
**Last updated:** [August 24, 2020, 3:42pm UTC](https://discourse.julialang.org/t/how-to-add-subtract-values-in-a-dataframe-or-array-column/45455 "2020-08-24T15:42:54Z")

</div>

I’m going over the array tutorial trying to see how to add 1 to the content of an array but am having difficulties. I do not want to replace the contents of the column by 1, but add 1 to the value already in the column. …

---

## [Proper structuring of an input data table](https://discourse.julialang.org/t/proper-structuring-of-an-input-data-table/45446)

<div class="topic-metadata">

**Author:** [@mamo](https://discourse.julialang.org/u/mamo)\
**Replies:** 4\
**Last updated:** [August 24, 2020, 2:53pm UTC](https://discourse.julialang.org/t/proper-structuring-of-an-input-data-table/45446 "2020-08-24T14:53:52Z")

</div>

How to build an input matrix (or a table) which will be sparse. For example: A is 4x4 matrix: A=\[1 . . .; . . 2 3; . 5 . 1; 1 3 . .\] If I use “missing” instead of dots, I have a problem with reading the data and ident…

---

## [Failed to obtain the correct phase?](https://discourse.julialang.org/t/failed-to-obtain-the-correct-phase/45350)

<div class="topic-metadata">

**Author:** [@tomtom](https://discourse.julialang.org/u/tomtom)\
**Replies:** 3\
**Last updated:** [August 24, 2020, 2:07pm UTC](https://discourse.julialang.org/t/failed-to-obtain-the-correct-phase/45350 "2020-08-24T14:07:58Z")

</div>

I’m trying to extract the amplitude, period and phase of a pure sinusoidal signal: using FFTW a = 3cos.(2π/17 .\* (1:4096) .+ 0.2); fa = fft(a)\[1:2048\]; fam = abs.(fa); famfm = findmax(fam) julia\> famfm = findmax(fam) (…

---

## [Proper declaration of constraint](https://discourse.julialang.org/t/proper-declaration-of-constraint/45424)

<div class="topic-metadata">

**Author:** [@mamo](https://discourse.julialang.org/u/mamo)\
**Replies:** 5\
**Last updated:** [August 24, 2020, 1:51pm UTC](https://discourse.julialang.org/t/proper-declaration-of-constraint/45424 "2020-08-24T13:51:39Z")

</div>

Constraint below says for each k, k=1, k=22, k=43 (since k is \< length(TIME)=63) PLEVEL\[1\]\<=… PLEVEL\[22\]\<=… PLEVEL\[43\]\<=… PLEVEL1 is binary. s1\[k in 1:interval:length(TIME) if k\<length(TIME)\], PLEVEL\[k\]-limit\<=M\*PLE…

---

## [Adding Hidden Fields to Parametric Types](https://discourse.julialang.org/t/adding-hidden-fields-to-parametric-types/45448)

<div class="topic-metadata">

**Author:** [@zekeriya.sari](https://discourse.julialang.org/u/zekeriya.sari)\
**Replies:** 8\
**Last updated:** [August 24, 2020, 1:50pm UTC](https://discourse.julialang.org/t/adding-hidden-fields-to-parametric-types/45448 "2020-08-24T13:50:39Z")

</div>

Say I want to define a macro which adds a hidden field to a user defined type. See the minimal working example below module Foo """ Modify ex by pushing hidden field. """ function push\_hidded\_field!(ex) paramex = …

---

## [Julia's offline documentation has no favicon](https://discourse.julialang.org/t/julias-offline-documentation-has-no-favicon/42942)

<div class="topic-metadata">

**Author:** [@melonedo](https://discourse.julialang.org/u/melonedo)\
**Replies:** 2\
**Last updated:** [August 1, 2020, 3:16pm UTC](https://discourse.julialang.org/t/julias-offline-documentation-has-no-favicon/42942 "2020-08-01T15:16:17Z")

</div>

Julia’s offline documentation has no favicon, while the online version does have one. As I love to use the offline version (which is much faster), this is really annoying. I inspected the index.html and it does not have…

---

## [Writing to DataFrames and CSV files](https://discourse.julialang.org/t/writing-to-dataframes-and-csv-files/36238)

<div class="topic-metadata">

**Author:** [@Smith](https://discourse.julialang.org/u/Smith)\
**Replies:** 14\
**Last updated:** [August 24, 2020, 12:38pm UTC](https://discourse.julialang.org/t/writing-to-dataframes-and-csv-files/36238 "2020-08-24T12:38:31Z")

</div>

Hi, I am looking to write output of a function for different runs to one CSV file. Using the DelimitedFiles package, I can write results to separate CSV files for each run. However, I want to write results from all runs …

---

## [A few intermediate Julia tutorials](https://discourse.julialang.org/t/a-few-intermediate-julia-tutorials/41813)

<div class="topic-metadata">

**Author:** [@johnmyleswhite](https://discourse.julialang.org/u/johnmyleswhite)\
**Replies:** 3\
**Last updated:** [June 23, 2020, 9:00pm UTC](https://discourse.julialang.org/t/a-few-intermediate-julia-tutorials/41813 "2020-06-23T21:00:15Z")

</div>

Lately I’ve been writing some Julia tutorials over the weekends to keep my coding skills up. I thought I’d share the repo as it stands today in case anybody’s interested: https://github.com/johnmyleswhite/julia\_tutorials …

---

## [\`CUDA error: out of memory\` with Flux](https://discourse.julialang.org/t/cuda-error-out-of-memory-with-flux/45269)

<div class="topic-metadata">

**Author:** [@natema](https://discourse.julialang.org/u/natema)\
**Replies:** 4\
**Last updated:** [August 24, 2020, 12:11pm UTC](https://discourse.julialang.org/t/cuda-error-out-of-memory-with-flux/45269 "2020-08-24T12:11:01Z")

</div>

I already posted about this issue here. After moving to Julia 1.5, I still get a similar error. When I run yiyu-test.jl I get ERROR: LoadError: CUDA error: out of memory (code 2, ERROR\_OUT\_OF\_MEMORY) Stacktrace: \[1\] …

---

## [Broadcast assignment for a custom array type without linear indices fails](https://discourse.julialang.org/t/broadcast-assignment-for-a-custom-array-type-without-linear-indices-fails/45361)

<div class="topic-metadata">

**Author:** [@hwjsnc](https://discourse.julialang.org/u/hwjsnc)\
**Replies:** 2\
**Last updated:** [August 24, 2020, 11:28am UTC](https://discourse.julialang.org/t/broadcast-assignment-for-a-custom-array-type-without-linear-indices-fails/45361 "2020-08-24T11:28:44Z")

</div>

I just did some housekeeping for one of my packages that defines a custom array type. In doing so, I ran my test suite and it fails for julia 1.5 where it worked for 1.3. I haven’t done a full detailed analysis of the pr…

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

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