# Latest

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

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

**Page:** 1943

---

## [Tracing and saving line number of a function call](https://discourse.julialang.org/t/tracing-and-saving-line-number-of-a-function-call/27488)

<div class="topic-metadata">

**Author:** [@epogrebnyak](https://discourse.julialang.org/u/epogrebnyak)\
**Replies:** 3\
**Last updated:** [August 13, 2019, 11:58am UTC](https://discourse.julialang.org/t/tracing-and-saving-line-number-of-a-function-call/27488 "2019-08-13T11:58:01Z")

</div>

I’m trying to trace the filename and line of a function call to use it later in the program. Using stacktrace() in code below, but my goal is revealing line 6 number, and so far I got to knowing line 3. function trace…

---

## [Plots renders exponents not correctly(?)](https://discourse.julialang.org/t/plots-renders-exponents-not-correctly/27495)

<div class="topic-metadata">

**Author:** [@LS64](https://discourse.julialang.org/u/LS64)\
**Replies:** 0\
**Last updated:** [August 13, 2019, 11:38am UTC](https://discourse.julialang.org/t/plots-renders-exponents-not-correctly/27495 "2019-08-13T11:38:02Z")

</div>

Dear all, I try to plot (Plots, GR) some curves with a y-label that contains an exponent. plot\_3 = plot(Time, N, title = "Runs with BNF and Reduction in Oceans", title\_location = :center, label = "", xlabel…

---

## [How to speed up a generic function evaluating multiple array calculations](https://discourse.julialang.org/t/how-to-speed-up-a-generic-function-evaluating-multiple-array-calculations/27419)

<div class="topic-metadata">

**Author:** [@xor0110](https://discourse.julialang.org/u/xor0110)\
**Replies:** 3\
**Last updated:** [August 13, 2019, 10:48am UTC](https://discourse.julialang.org/t/how-to-speed-up-a-generic-function-evaluating-multiple-array-calculations/27419 "2019-08-13T10:48:09Z")

</div>

This is maybe more of a software design question than performance, or perhaps more adequate to Domains-Optimization category. I also don’t know if any available packages like JuMP or Flux could solve this for me already …

---

## [Physics / Computational Physics research group in U.S. University that uses Julia?](https://discourse.julialang.org/t/physics-computational-physics-research-group-in-u-s-university-that-uses-julia/27216)

<div class="topic-metadata">

**Author:** [@jling](https://discourse.julialang.org/u/jling)\
**Replies:** 12\
**Last updated:** [August 13, 2019, 10:33am UTC](https://discourse.julialang.org/t/physics-computational-physics-research-group-in-u-s-university-that-uses-julia/27216 "2019-08-13T10:33:32Z")

</div>

It’s the time of the year to apply for grad school. I have been doing high-energy / accelerator science and it’s my feeling that the field’s need for HPC will surge (especially with a unified codebase). So, anyone knows…

---

## [How to detect & store lunar eclipse events?](https://discourse.julialang.org/t/how-to-detect-store-lunar-eclipse-events/27459)

<div class="topic-metadata">

**Author:** [@Calum\_H](https://discourse.julialang.org/u/Calum_H)\
**Replies:** 6\
**Last updated:** [August 13, 2019, 10:26am UTC](https://discourse.julialang.org/t/how-to-detect-store-lunar-eclipse-events/27459 "2019-08-13T10:26:49Z")

</div>

Hi all, I am quite new, this is my first question on here so hope I have provided enough detail! I am writing a script for detecting lunar eclipses across a spacecraft, using various Astrodynamics julia packages (AstroT…

---

## [Moving Base.skipmissing to Base.Iterators](https://discourse.julialang.org/t/moving-base-skipmissing-to-base-iterators/27493)

<div class="topic-metadata">

**Author:** [@pnalysz](https://discourse.julialang.org/u/pnalysz)\
**Replies:** 0\
**Last updated:** [August 13, 2019, 9:43am UTC](https://discourse.julialang.org/t/moving-base-skipmissing-to-base-iterators/27493 "2019-08-13T09:43:57Z")

</div>

As the title says… Is there any reason not do it?

---

## [Julia in Nature](https://discourse.julialang.org/t/julia-in-nature/27192)

<div class="topic-metadata">

**Author:** [@NiclasMattsson](https://discourse.julialang.org/u/NiclasMattsson)\
**Replies:** 8\
**Last updated:** [August 13, 2019, 6:39am UTC](https://discourse.julialang.org/t/julia-in-nature/27192 "2019-08-13T06:39:34Z")

</div>

I was pleasantly surprised today to see a short feature on Julia in Nature, one of the most prestigious scientific journals in the world. Web version: https://www.nature.com/articles/d41586-019-02310-3 PDF: I don’t …

---

## [How (or whether) to force correct handling of different return types?](https://discourse.julialang.org/t/how-or-whether-to-force-correct-handling-of-different-return-types/27482)

<div class="topic-metadata">

**Author:** [@jules](https://discourse.julialang.org/u/jules)\
**Replies:** 2\
**Last updated:** [August 13, 2019, 6:26am UTC](https://discourse.julialang.org/t/how-or-whether-to-force-correct-handling-of-different-return-types/27482 "2019-08-13T06:26:16Z")

</div>

I have a stylistic question. From statically compiled languages I am used to having to define what a function’s return values can be. In Julia, I don’t have to. Let’s take circle line intersection as an example. The resu…

---

## [Mux.jl mysterious d() function](https://discourse.julialang.org/t/mux-jl-mysterious-d-function/27436)

<div class="topic-metadata">

**Author:** [@milesf](https://discourse.julialang.org/u/milesf)\
**Replies:** 4\
**Last updated:** [August 13, 2019, 4:45am UTC](https://discourse.julialang.org/t/mux-jl-mysterious-d-function/27436 "2019-08-13T04:45:41Z")

</div>

Where is this d() function defined? I can’t find it in Mux.jl, or HTTP.jl. https://github.com/JuliaWeb/Mux.jl/blob/b8419df8774c0ee14052320d22bab41b653d0c01/src/routing.jl#L19

---

## [Making my own first project/package - how to update/test dependencies](https://discourse.julialang.org/t/making-my-own-first-project-package-how-to-update-test-dependencies/27338)

<div class="topic-metadata">

**Author:** [@tue](https://discourse.julialang.org/u/tue)\
**Replies:** 6\
**Last updated:** [August 13, 2019, 3:01am UTC](https://discourse.julialang.org/t/making-my-own-first-project-package-how-to-update-test-dependencies/27338 "2019-08-13T03:01:02Z")

</div>

Hi I have made the following the following code: https://github.com/tueboesen/LapNet Which have quite a few dependencies in it. The problem is that these dependencies are not reflected in the Project.toml, which only c…

---

## [VS Code extension v0.12.0 beta release](https://discourse.julialang.org/t/vs-code-extension-v0-12-0-beta-release/25420)

<div class="topic-metadata">

**Author:** [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Replies:** 47\
**Last updated:** [August 12, 2019, 10:11pm UTC](https://discourse.julialang.org/t/vs-code-extension-v0-12-0-beta-release/25420 "2019-08-12T22:11:59Z")

</div>

We just released a first beta v0.12.0.beta.1 for the Julia extension for VS code here. We’d much appreciate it if we could get some testers to try it out and give feedback on bugs before we release it to the marketplace. …

---

## [ForwardDiff fast construction of vectors/matrices without cats](https://discourse.julialang.org/t/forwarddiff-fast-construction-of-vectors-matrices-without-cats/27468)

<div class="topic-metadata">

**Author:** [@ys3636](https://discourse.julialang.org/u/ys3636)\
**Replies:** 6\
**Last updated:** [August 12, 2019, 9:25pm UTC](https://discourse.julialang.org/t/forwarddiff-fast-construction-of-vectors-matrices-without-cats/27468 "2019-08-12T21:25:21Z")

</div>

Hi, I’m trying to use Optim to do maximum-likelihood estimation of some parameters in a custom likelihood model. In particular, I would like to incorporate autodiff to increase the accuracy of my estimates. However, set…

---

## [Error spawn file when file exists in Julia](https://discourse.julialang.org/t/error-spawn-file-when-file-exists-in-julia/27444)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 9\
**Last updated:** [August 12, 2019, 9:23pm UTC](https://discourse.julialang.org/t/error-spawn-file-when-file-exists-in-julia/27444 "2019-08-12T21:23:30Z")

</div>

Hello, I am trying to run a shell-based bioinformatic tool via Julia. I created a file containing a text query and assigned it as a parameter to the aforementioned command (blastn). However, it looks like the file doe s…

---

## [The type of a range step, defined as Float32, changes to Float64](https://discourse.julialang.org/t/the-type-of-a-range-step-defined-as-float32-changes-to-float64/27411)

<div class="topic-metadata">

**Author:** [@fedoroff](https://discourse.julialang.org/u/fedoroff)\
**Replies:** 4\
**Last updated:** [August 12, 2019, 7:14pm UTC](https://discourse.julialang.org/t/the-type-of-a-range-step-defined-as-float32-changes-to-float64/27411 "2019-08-12T19:14:13Z")

</div>

I wonder why in the following example the type of the range step becomes Float64 while originally it was defined as Float32: julia\> x = range(1f0, 10f0, step=0.1f0) 1.0f0:0.1f0:10.0f0 julia\> x.step 0.1 julia\> typeof(x…

---

## [Container of PSD variables in JuMP](https://discourse.julialang.org/t/container-of-psd-variables-in-jump/27448)

<div class="topic-metadata">

**Author:** [@nrontsis](https://discourse.julialang.org/u/nrontsis)\
**Replies:** 3\
**Last updated:** [August 12, 2019, 4:02pm UTC](https://discourse.julialang.org/t/container-of-psd-variables-in-jump/27448 "2019-08-12T16:02:21Z")

</div>

What is the best way to create a container of PSD “variables” such that X\[i\] = i-th PSD variable?

---

## [Select SubdataFrame in groupDataFrame by symbol](https://discourse.julialang.org/t/select-subdataframe-in-groupdataframe-by-symbol/27463)

<div class="topic-metadata">

**Author:** [@ErwanPiR](https://discourse.julialang.org/u/ErwanPiR)\
**Replies:** 0\
**Last updated:** [August 12, 2019, 3:43pm UTC](https://discourse.julialang.org/t/select-subdataframe-in-groupdataframe-by-symbol/27463 "2019-08-12T15:43:47Z")

</div>

Hi, I haven’t found the way to select a specific SubDataFrame in a Grouped DataFrame. Let’s say you have the following dataframe df = DataFrame(A = rand(5), B = \["type1", "type2", "type1", "Type3", "type2"\]) that you…

---

## [Unexpected method error during function call](https://discourse.julialang.org/t/unexpected-method-error-during-function-call/27452)

<div class="topic-metadata">

**Author:** [@rocflight83](https://discourse.julialang.org/u/rocflight83)\
**Replies:** 4\
**Last updated:** [August 12, 2019, 3:22pm UTC](https://discourse.julialang.org/t/unexpected-method-error-during-function-call/27452 "2019-08-12T15:22:05Z")

</div>

Why does the following code cause a method error on adding type nothing with an Int? function flipname(nm) i = findfirst(isequal(','), nm) # returns type nothing if finds no occurrence i == nothing ? nm : nm\[i+2…

---

## [Deepcopying struct with array fields](https://discourse.julialang.org/t/deepcopying-struct-with-array-fields/27430)

<div class="topic-metadata">

**Author:** [@DocDave](https://discourse.julialang.org/u/DocDave)\
**Replies:** 14\
**Last updated:** [August 12, 2019, 3:16pm UTC](https://discourse.julialang.org/t/deepcopying-struct-with-array-fields/27430 "2019-08-12T15:16:53Z")

</div>

I have a struct containing fields, some of which are multidimensional Arrays, however I want to be able to copy (both deep and shallow) between instances of this type. Comments on an answer from SO indicate that this can…

---

## [How to make a groupedbar plot with several stacked bars](https://discourse.julialang.org/t/how-to-make-a-groupedbar-plot-with-several-stacked-bars/27306)

<div class="topic-metadata">

**Author:** [@gobs](https://discourse.julialang.org/u/gobs)\
**Replies:** 4\
**Last updated:** [August 12, 2019, 3:10pm UTC](https://discourse.julialang.org/t/how-to-make-a-groupedbar-plot-with-several-stacked-bars/27306 "2019-08-12T15:10:35Z")

</div>

It’s really hard to explain in words what I would like to do, so here is a picture: The black lines represent “levels” - each level has a stacked bar in it. I know how this was done in Matlab, I just need help transl…

---

## [3,000+ files and 1.4GB build directory with PackageCompiler. What am I doing wrong?](https://discourse.julialang.org/t/3-000-files-and-1-4gb-build-directory-with-packagecompiler-what-am-i-doing-wrong/27414)

<div class="topic-metadata">

**Author:** [@Lachlan\_Smith](https://discourse.julialang.org/u/Lachlan_Smith)\
**Replies:** 5\
**Last updated:** [August 12, 2019, 2:02pm UTC](https://discourse.julialang.org/t/3-000-files-and-1-4gb-build-directory-with-packagecompiler-what-am-i-doing-wrong/27414 "2019-08-12T14:02:54Z")

</div>

\[basically copy/pasted from my post on reddit which can be found here\] A few screenshots to illustrate what I’m dealing with: Imgur: The magic of the Internet As the title says, I’m a bit lost here. I took the example…

---

## [Correct usage of build\_sysimg](https://discourse.julialang.org/t/correct-usage-of-build-sysimg/27457)

<div class="topic-metadata">

**Author:** [@fverdugo](https://discourse.julialang.org/u/fverdugo)\
**Replies:** 2\
**Last updated:** [August 12, 2019, 1:34pm UTC](https://discourse.julialang.org/t/correct-usage-of-build-sysimg/27457 "2019-08-12T13:34:59Z")

</div>

I am unable to build a system image using the build\_sysimg command. I get different types of errors. Assume that I want to build a system with the following user definitions: # file userimg.jl function bar() println(…

---

## [Need to include one file multiple times, how to avoid warning](https://discourse.julialang.org/t/need-to-include-one-file-multiple-times-how-to-avoid-warning/27439)

<div class="topic-metadata">

**Author:** [@zhangliye](https://discourse.julialang.org/u/zhangliye)\
**Replies:** 14\
**Last updated:** [August 12, 2019, 1:08pm UTC](https://discourse.julialang.org/t/need-to-include-one-file-multiple-times-how-to-avoid-warning/27439 "2019-08-12T13:08:32Z")

</div>

I get some warnings when I include one public file in several other files in a same package. It is straightforward to include the public file which defines some common functions. The code is as follows. # ./src/test\_red…

---

## [Applications closing May 29: MLJ (Machine Learning in Julia) tutorial and development sprint, Alan Turing Institute, London](https://discourse.julialang.org/t/applications-closing-may-29-mlj-machine-learning-in-julia-tutorial-and-development-sprint-alan-turing-institute-london/24665)

<div class="topic-metadata">

**Author:** [@ablaom](https://discourse.julialang.org/u/ablaom)\
**Replies:** 5\
**Last updated:** [August 12, 2019, 12:18pm UTC](https://discourse.julialang.org/t/applications-closing-may-29-mlj-machine-learning-in-julia-tutorial-and-development-sprint-alan-turing-institute-london/24665 "2019-08-12T12:18:18Z")

</div>

Announcing MLJ + sktime tutorial and development sprint The Alan Turing Institute is developing ML/AI toolboxes: a Julia package called MLJ, Machine Learning in Julia, a Python package sktime (sklearn-like toolbox …

---

## [Thread- and process-id in log messages?](https://discourse.julialang.org/t/thread-and-process-id-in-log-messages/27303)

<div class="topic-metadata">

**Author:** [@oschulz](https://discourse.julialang.org/u/oschulz)\
**Replies:** 3\
**Last updated:** [August 12, 2019, 12:13pm UTC](https://discourse.julialang.org/t/thread-and-process-id-in-log-messages/27303 "2019-08-12T12:13:04Z")

</div>

It would be very useful to have a mechanism that automatically adds thread- and process-id to log messages. Can this currently be implemented using a custom logger, or would this require changes to Julia’s logging system…

---

## [Ho can I append a value into initialised array without first empty row?](https://discourse.julialang.org/t/ho-can-i-append-a-value-into-initialised-array-without-first-empty-row/27443)

<div class="topic-metadata">

**Author:** [@Manu\_Francis](https://discourse.julialang.org/u/Manu_Francis)\
**Replies:** 2\
**Last updated:** [August 12, 2019, 10:39am UTC](https://discourse.julialang.org/t/ho-can-i-append-a-value-into-initialised-array-without-first-empty-row/27443 "2019-08-12T10:39:35Z")

</div>

Hi, I am trying to append some values into an initialized array. But first elements of this array is not the first appended value. I did like follows: #initialized an array a = Array{Float64,1} #append into a a = \[a;5;…

---

## [Unpacking CartesianIndex](https://discourse.julialang.org/t/unpacking-cartesianindex/27374)

<div class="topic-metadata">

**Author:** [@Charlie\_He](https://discourse.julialang.org/u/Charlie_He)\
**Replies:** 7\
**Last updated:** [August 12, 2019, 9:43am UTC](https://discourse.julialang.org/t/unpacking-cartesianindex/27374 "2019-08-12T09:43:30Z")

</div>

for (i, j) in CartesianIndices(a) println(i, j) end produces an error: ERROR: iteration is deliberately unsupported for CartesianIndex. Use \`I\` rather than \`I...\`, or use \`Tuple(I)...\` This is an unreasonable desi…

---

## [Error assigning bash command's output to variable with Julia](https://discourse.julialang.org/t/error-assigning-bash-commands-output-to-variable-with-julia/27389)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 2\
**Last updated:** [August 12, 2019, 8:04am UTC](https://discourse.julialang.org/t/error-assigning-bash-commands-output-to-variable-with-julia/27389 "2019-08-12T08:04:23Z")

</div>

I would like to run a bash command called samtools and assign its output to a variable that I can process with julia. Thus I made: julia\> r\_file "A3-T\_F-AlnSrtDed.bam" julia\> r\_locus "chrV:254748988-254749089" julia\> qu…

---

## [Memory usage seems extremely high in standard Flux, is it any better with Zygote?](https://discourse.julialang.org/t/memory-usage-seems-extremely-high-in-standard-flux-is-it-any-better-with-zygote/27435)

<div class="topic-metadata">

**Author:** [@tue](https://discourse.julialang.org/u/tue)\
**Replies:** 2\
**Last updated:** [August 12, 2019, 7:56am UTC](https://discourse.julialang.org/t/memory-usage-seems-extremely-high-in-standard-flux-is-it-any-better-with-zygote/27435 "2019-08-12T07:56:20Z")

</div>

Hi I’m running some tests on CIFAR10, with a residual CNN, and so far I’m getting very discouraging results for the memory consumption. I’m doing something rather atypical where I regularize each layer of my network sepa…

---

## [Precompile function for types defined in other modules](https://discourse.julialang.org/t/precompile-function-for-types-defined-in-other-modules/27410)

<div class="topic-metadata">

**Author:** [@fverdugo](https://discourse.julialang.org/u/fverdugo)\
**Replies:** 4\
**Last updated:** [August 12, 2019, 7:09am UTC](https://discourse.julialang.org/t/precompile-function-for-types-defined-in-other-modules/27410 "2019-08-12T07:09:21Z")

</div>

Assume that I have a module Foo that defines a function foo, and another module Bars (note the final s) that depends on Foo and defines a new type Bar. Is it possible to precompile function foo for arguments of type Bar …

---

## [Invalid quoted expression when assigning tuple to multiple variables](https://discourse.julialang.org/t/invalid-quoted-expression-when-assigning-tuple-to-multiple-variables/27404)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 2\
**Last updated:** [August 12, 2019, 7:06am UTC](https://discourse.julialang.org/t/invalid-quoted-expression-when-assigning-tuple-to-multiple-variables/27404 "2019-08-12T07:06:11Z")

</div>

This is valid code: julia\> x,y = 1,2 (1, 2) julia\> x 1 julia\> y 2 But, the quoted expression isn’t correct and cannot be evaluated… julia\> :(x,y = 1,2) |\> dump Expr head: Symbol tuple args: Array{Any}((3,)) …

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

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