# Latest

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

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

**Page:** 1919

---

## [How to save a plot structure](https://discourse.julialang.org/t/how-to-save-a-plot-structure/28694)

<div class="topic-metadata">

**Author:** [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Replies:** 4\
**Last updated:** [September 18, 2019, 11:21pm UTC](https://discourse.julialang.org/t/how-to-save-a-plot-structure/28694 "2019-09-18T23:21:04Z")

</div>

I’d like to save a plot but not as an image file, basically I want to be able to save a Plot p, end my julia session, open a new one, load Plot p and then edit it with new series for example. I tried to use BSON like th…

---

## [Benchmarking with interpolated variable faster than hardcoded literal value](https://discourse.julialang.org/t/benchmarking-with-interpolated-variable-faster-than-hardcoded-literal-value/28927)

<div class="topic-metadata">

**Author:** [@milesf](https://discourse.julialang.org/u/milesf)\
**Replies:** 1\
**Last updated:** [September 18, 2019, 11:04pm UTC](https://discourse.julialang.org/t/benchmarking-with-interpolated-variable-faster-than-hardcoded-literal-value/28927 "2019-09-18T23:04:29Z")

</div>

Consistently observing that using an interpolated variable to iterate over for i = 1:n is faster than using a literal for i = 1:10. It’s about 7.5 ns vs 6 ns, so not much absolute difference, but somewhat significant rel…

---

## [Julia Package Task Views](https://discourse.julialang.org/t/julia-package-task-views/28903)

<div class="topic-metadata">

**Author:** [@Yifan\_Liu](https://discourse.julialang.org/u/Yifan_Liu)\
**Replies:** 1\
**Last updated:** [September 18, 2019, 8:01pm UTC](https://discourse.julialang.org/t/julia-package-task-views/28903 "2019-09-18T20:01:40Z")

</div>

Is it possible for Julia to have a Task Views website like R does, so new users don’t need to write a post to ask the availability of packages in a specific area?

---

## [Adding a package while using Revise.jl crashes](https://discourse.julialang.org/t/adding-a-package-while-using-revise-jl-crashes/28900)

<div class="topic-metadata">

**Author:** [@affans](https://discourse.julialang.org/u/affans)\
**Replies:** 4\
**Last updated:** [September 18, 2019, 7:49pm UTC](https://discourse.julialang.org/t/adding-a-package-while-using-revise-jl-crashes/28900 "2019-09-18T19:49:35Z")

</div>

I load Revise.jl in my startup file as follows: # ensure that every Julia session uses Revise atreplinit() do repl try @eval using Revise @async Revise.wait\_steal\_repl\_backend() catch end end…

---

## [SymEngine - turn to function](https://discourse.julialang.org/t/symengine-turn-to-function/28907)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 3\
**Last updated:** [September 18, 2019, 7:26pm UTC](https://discourse.julialang.org/t/symengine-turn-to-function/28907 "2019-09-18T19:26:21Z")

</div>

Hey guys! I have derived a symbolic array as: Bmat 3×8 Array{Basic,2}: (1/4)\*y/(a\*b) + (-1/4)\*a^(-1) 0 (-1/4)\*y/(a\*b) + (1/4)\*a^(-1) … 0 (-1/4)\*y/(a\*b) + (-…

---

## [Dir failing in shell mode (Win, 1.0)](https://discourse.julialang.org/t/dir-failing-in-shell-mode-win-1-0/14989)

<div class="topic-metadata">

**Author:** [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Replies:** 5\
**Last updated:** [September 18, 2019, 7:08pm UTC](https://discourse.julialang.org/t/dir-failing-in-shell-mode-win-1-0/14989 "2019-09-18T19:08:14Z")

</div>

Not a windows user, just doing some tests on the platform – but isn’t this supposed to work? shell\> dir ERROR: IOError: could not spawn \`dir\`: no such file or directory (ENOENT) Stacktrace: \[1\] \_jl\_spawn(::String, ::Ar…

---

## [Confusion about prod()](https://discourse.julialang.org/t/confusion-about-prod/28906)

<div class="topic-metadata">

**Author:** [@ddejohn](https://discourse.julialang.org/u/ddejohn)\
**Replies:** 8\
**Last updated:** [September 18, 2019, 6:28pm UTC](https://discourse.julialang.org/t/confusion-about-prod/28906 "2019-09-18T18:28:02Z")

</div>

What am I misunderstanding about prod() that poly2 gives a reducing over empty collection error? # WORKS function poly(i, x, xx) p = 1 for j in 1:i-1 p \*= (x-xx\[j\]) end return p end # REDUCING O…

---

## [Issue with LinearAlgebra's \`\\\`](https://discourse.julialang.org/t/issue-with-linearalgebras/28901)

<div class="topic-metadata">

**Author:** [@srb](https://discourse.julialang.org/u/srb)\
**Replies:** 7\
**Last updated:** [September 18, 2019, 5:46pm UTC](https://discourse.julialang.org/t/issue-with-linearalgebras/28901 "2019-09-18T17:46:59Z")

</div>

I’m having some trouble with the \\ operator for matrices. Supposedly, for two matrices A and B it should give x satisfying Ax = B. However, julia\> A = \[0 1 4; 1 3 5; 3 7 7\] 3×3 Array{Int64,2}: 0 1 4 1 3 5 3 7 7…

---

## [Copying of arrays and array elements](https://discourse.julialang.org/t/copying-of-arrays-and-array-elements/28897)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 4\
**Last updated:** [September 18, 2019, 4:34pm UTC](https://discourse.julialang.org/t/copying-of-arrays-and-array-elements/28897 "2019-09-18T16:34:54Z")

</div>

Hey guys! I discovered this kind of behaviour in Julia. Say that I define a vector as as: a = \[1 2 3\] Then I define: b = a\[2\] And: c = a If I now change a by: a\[2\] = 4 a 1×3 Array{Int64,2}: 1 4 3 Then c becom…

---

## [Convenient way to create a copy of an immutable struct with a changed field](https://discourse.julialang.org/t/convenient-way-to-create-a-copy-of-an-immutable-struct-with-a-changed-field/28899)

<div class="topic-metadata">

**Author:** [@tamasgal](https://discourse.julialang.org/u/tamasgal)\
**Replies:** 3\
**Last updated:** [September 18, 2019, 4:04pm UTC](https://discourse.julialang.org/t/convenient-way-to-create-a-copy-of-an-immutable-struct-with-a-changed-field/28899 "2019-09-18T16:04:40Z")

</div>

It might sound a bit weird but I am facing the following issue quite often: Given a largish struct: struct Foo a b c d e f g h i j end And a bunch of them in a Vector foos = \[…

---

## [Maxwell Fit, Julia](https://discourse.julialang.org/t/maxwell-fit-julia/28835)

<div class="topic-metadata">

**Author:** [@Romero\_Azzalini](https://discourse.julialang.org/u/Romero_Azzalini)\
**Replies:** 5\
**Last updated:** [September 18, 2019, 4:00pm UTC](https://discourse.julialang.org/t/maxwell-fit-julia/28835 "2019-09-18T16:00:02Z")

</div>

Hi, I would love to make a Maxwell Fit to my data in Julia, unfortunately I’m lost here… I’ve seen a fit in Python with scipy, but I’ve no idea how to use PyCall… Best, Hannes

---

## [Plotting a differential equation using Sympy.jl and Plots.jl](https://discourse.julialang.org/t/plotting-a-differential-equation-using-sympy-jl-and-plots-jl/28876)

<div class="topic-metadata">

**Author:** [@00krishna](https://discourse.julialang.org/u/00krishna)\
**Replies:** 9\
**Last updated:** [September 18, 2019, 3:41pm UTC](https://discourse.julialang.org/t/plotting-a-differential-equation-using-sympy-jl-and-plots-jl/28876 "2019-09-18T15:41:53Z")

</div>

I was just checking out some parts of the Julia ecosystem and wanted to plot the solutions to some simple linear first order ordinary differential equations that were solved by Sympy. So if I have a growth equation like …

---

## [In-place functions with arrays and scalars](https://discourse.julialang.org/t/in-place-functions-with-arrays-and-scalars/28885)

<div class="topic-metadata">

**Author:** [@HenrikM](https://discourse.julialang.org/u/HenrikM)\
**Replies:** 7\
**Last updated:** [September 18, 2019, 12:27pm UTC](https://discourse.julialang.org/t/in-place-functions-with-arrays-and-scalars/28885 "2019-09-18T12:27:58Z")

</div>

For a function that returns scalars and arrays, what is good practice for the mutating version? Below, x and y are scalars and A and B are arrays. function f(...) x = ... y = ... A = ... B = ... return x, A, y…

---

## [Project.toml path is incorrect](https://discourse.julialang.org/t/project-toml-path-is-incorrect/28882)

<div class="topic-metadata">

**Author:** [@feanor12](https://discourse.julialang.org/u/feanor12)\
**Replies:** 2\
**Last updated:** [September 18, 2019, 11:42am UTC](https://discourse.julialang.org/t/project-toml-path-is-incorrect/28882 "2019-09-18T11:42:44Z")

</div>

I tried to add a Project.toml file to a project, but it seems there is a problem with the path. When adding or viewing the status there is a folder created inside the project. This folder contains the directory structur…

---

## [Printf with width field as argument](https://discourse.julialang.org/t/printf-with-width-field-as-argument/28685)

<div class="topic-metadata">

**Author:** [@johanmon](https://discourse.julialang.org/u/johanmon)\
**Replies:** 8\
**Last updated:** [September 18, 2019, 10:36am UTC](https://discourse.julialang.org/t/printf-with-width-field-as-argument/28685 "2019-09-18T10:36:48Z")

</div>

Tried using a \* width specifier with @printf but widthout luck: julia version 1.1.1 julia\> @printf(“hello %\*s\\n”, 10, “hej”) ERROR: LoadError: ArgumentError: invalid printf format string: “hello %\*s\\n” This works fin…

---

## [How to get to know in which subfunction a macro is called?](https://discourse.julialang.org/t/how-to-get-to-know-in-which-subfunction-a-macro-is-called/28877)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 3\
**Last updated:** [September 18, 2019, 10:31am UTC](https://discourse.julialang.org/t/how-to-get-to-know-in-which-subfunction-a-macro-is-called/28877 "2019-09-18T10:31:14Z")

</div>

Hi there, using macros we have access to the special variables \_\_modules\_\_ which gives me the current module, and \_\_source\_\_ which gives linenumber and file. Neither of them can tell me in which subfunction the code is…

---

## [Quote with a list of kwargs](https://discourse.julialang.org/t/quote-with-a-list-of-kwargs/28879)

<div class="topic-metadata">

**Author:** [@tlienart](https://discourse.julialang.org/u/tlienart)\
**Replies:** 3\
**Last updated:** [September 18, 2019, 10:19am UTC](https://discourse.julialang.org/t/quote-with-a-list-of-kwargs/28879 "2019-09-18T10:19:26Z")

</div>

The following code is a MWE of what I’m trying to do; I’d like to write the inside of the foo function as a quote if possible (in order to make the code in my use case more readable and maintainable). function foo(fname…

---

## [Optim.jl is installed successfully, but "optimize" function is not inside, nor other functions!](https://discourse.julialang.org/t/optim-jl-is-installed-successfully-but-optimize-function-is-not-inside-nor-other-functions/28878)

<div class="topic-metadata">

**Author:** [@Hani20](https://discourse.julialang.org/u/Hani20)\
**Replies:** 15\
**Last updated:** [September 18, 2019, 9:49am UTC](https://discourse.julialang.org/t/optim-jl-is-installed-successfully-but-optimize-function-is-not-inside-nor-other-functions/28878 "2019-09-18T09:49:39Z")

</div>

dear all, I am working on Julia 0.6.4. I installed Optim.jl and its binary in my directory of current project. but when I call “optimize” function of this package, I got the error: ERROR: UndefVarError: optimize not de…

---

## [Is it really possible for rand to throw a zero?](https://discourse.julialang.org/t/is-it-really-possible-for-rand-to-throw-a-zero/28505)

<div class="topic-metadata">

**Author:** [@aerdely](https://discourse.julialang.org/u/aerdely)\
**Replies:** 61\
**Last updated:** [September 18, 2019, 9:41am UTC](https://discourse.julialang.org/t/is-it-really-possible-for-rand-to-throw-a-zero/28505 "2019-09-18T09:41:23Z")

</div>

rand documentation says it draws iid uniformly distributed values in the half-open unit interval \[0,1) which includes zero but… Is rand ever throwing a zero? I have tried several times with minimum(rand(1\_000\_000\_000)) a…

---

## [Appropriate Structures for Reusing Code](https://discourse.julialang.org/t/appropriate-structures-for-reusing-code/28871)

<div class="topic-metadata">

**Author:** [@anodos](https://discourse.julialang.org/u/anodos)\
**Replies:** 4\
**Last updated:** [September 18, 2019, 5:08am UTC](https://discourse.julialang.org/t/appropriate-structures-for-reusing-code/28871 "2019-09-18T05:08:34Z")

</div>

I’ve recently been forced to relearn python for a work application. Needless to say, after working with Julia for a while, there were plenty of things I found a little painful (vectorisation, the need to use numba/cython…

---

## [KrylovKit svd solver not running properly](https://discourse.julialang.org/t/krylovkit-svd-solver-not-running-properly/28812)

<div class="topic-metadata">

**Author:** [@iamsuddhasattwa](https://discourse.julialang.org/u/iamsuddhasattwa)\
**Replies:** 13\
**Last updated:** [September 18, 2019, 4:17am UTC](https://discourse.julialang.org/t/krylovkit-svd-solver-not-running-properly/28812 "2019-09-18T04:17:43Z")

</div>

I am encountering a problem with the svd solver of the KylovKit.jl package. I am trying to compute the SVD of a 90000X90000 sparse matrix, with a fraction of 2.4E-4 elements non-zero. However, the following execution us…

---

## [Blank images and "dead pixels" in Makie](https://discourse.julialang.org/t/blank-images-and-dead-pixels-in-makie/28609)

<div class="topic-metadata">

**Author:** [@dalarev](https://discourse.julialang.org/u/dalarev)\
**Replies:** 42\
**Last updated:** [September 18, 2019, 3:55am UTC](https://discourse.julialang.org/t/blank-images-and-dead-pixels-in-makie/28609 "2019-09-18T03:55:54Z")

</div>

I run into blank images and “dead pixels” when running this Makie example (see below). The bottom-center image is blank, while the bottom-right image has a “dead pixel” at the bottom-right corner; hard to see, but it is…

---

## [Marking more standard library methods as pure to enable LLVM optimizations?](https://discourse.julialang.org/t/marking-more-standard-library-methods-as-pure-to-enable-llvm-optimizations/28732)

<div class="topic-metadata">

**Author:** [@Olof\_Salberger](https://discourse.julialang.org/u/Olof_Salberger)\
**Replies:** 11\
**Last updated:** [September 17, 2019, 9:34pm UTC](https://discourse.julialang.org/t/marking-more-standard-library-methods-as-pure-to-enable-llvm-optimizations/28732 "2019-09-17T21:34:38Z")

</div>

LLVM can apply some amazing optimizations to arithmetic code (including most of the techniques in Hacker’s delight) if it knows that various operands are constant. However, many Julia functions are not marked as pure, wh…

---

## [Problems with IterativeSolvers.svdl() routine](https://discourse.julialang.org/t/problems-with-iterativesolvers-svdl-routine/28866)

<div class="topic-metadata">

**Author:** [@iamsuddhasattwa](https://discourse.julialang.org/u/iamsuddhasattwa)\
**Replies:** 0\
**Last updated:** [September 17, 2019, 9:17pm UTC](https://discourse.julialang.org/t/problems-with-iterativesolvers-svdl-routine/28866 "2019-09-17T21:17:26Z")

</div>

The svdl() routine of the IterativeSolvers.jl package is giving me completely wrong errors, even for a 4X4 identity matrix. Am I doing something wrong ? julia\> using IterativeSolvers; julia\> using LinearAlgebra; julia\>…

---

## [Sorting arrays of structures](https://discourse.julialang.org/t/sorting-arrays-of-structures/18725)

<div class="topic-metadata">

**Author:** [@KirillGerke](https://discourse.julialang.org/u/KirillGerke)\
**Replies:** 13\
**Last updated:** [September 17, 2019, 8:54pm UTC](https://discourse.julialang.org/t/sorting-arrays-of-structures/18725 "2019-09-17T20:54:24Z")

</div>

Dear All, Could you, please, give me a hand in a sorting problem: mutable struct Vox radiusR::Float64 x::Int32 y::Int32 z::Int32 end Voxels=Vector{Vox}(undef, 0) #loop starts here to fill the arrays of…

---

## [What exactly does @spawnat capture?](https://discourse.julialang.org/t/what-exactly-does-spawnat-capture/28865)

<div class="topic-metadata">

**Author:** [@Chong\_Wang](https://discourse.julialang.org/u/Chong_Wang)\
**Replies:** 0\
**Last updated:** [September 17, 2019, 8:46pm UTC](https://discourse.julialang.org/t/what-exactly-does-spawnat-capture/28865 "2019-09-17T20:46:48Z")

</div>

From the documents, I get the impression that the following statement @spawnat 2 f(a, b) will run if f is defined on the remote processes. @spawnat will capture the variable a and b automatically. However, this functio…

---

## [Call macro created function/types from generated function. world age problem](https://discourse.julialang.org/t/call-macro-created-function-types-from-generated-function-world-age-problem/28859)

<div class="topic-metadata">

**Author:** [@Orbots](https://discourse.julialang.org/u/Orbots)\
**Replies:** 2\
**Last updated:** [September 17, 2019, 8:19pm UTC](https://discourse.julialang.org/t/call-macro-created-function-types-from-generated-function-world-age-problem/28859 "2019-09-17T20:19:36Z")

</div>

I want to allow a user of my module to generate some types and functions via a macro which are then supported by generated functions. For reasons, I am able to deduce constant scalar numbers from type information for a …

---

## [Dictating Julia code (for those who wish to avoid or control RSI)](https://discourse.julialang.org/t/dictating-julia-code-for-those-who-wish-to-avoid-or-control-rsi/14062)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 7\
**Last updated:** [September 17, 2019, 4:11pm UTC](https://discourse.julialang.org/t/dictating-julia-code-for-those-who-wish-to-avoid-or-control-rsi/14062 "2019-09-17T16:11:20Z")

</div>

A while back someone asked me about my approach to working with a code while avoiding typing and mousing by hand. I promised a video illustrating the basics. Since it may be of more general use, here it is: Dropbox - Fil…

---

## [Ways to speed up this code](https://discourse.julialang.org/t/ways-to-speed-up-this-code/28841)

<div class="topic-metadata">

**Author:** [@IljaK91](https://discourse.julialang.org/u/IljaK91)\
**Replies:** 4\
**Last updated:** [September 17, 2019, 3:57pm UTC](https://discourse.julialang.org/t/ways-to-speed-up-this-code/28841 "2019-09-17T15:57:55Z")

</div>

Hey everybody, I want to run this code on a relatively large dataset consisting of daily firm-level, industry-level and market-level data. This code takes long to run, because I run a simple regression for every firm-mo…

---

## [Understanding Blink windows](https://discourse.julialang.org/t/understanding-blink-windows/28852)

<div class="topic-metadata">

**Author:** [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Replies:** 0\
**Last updated:** [September 17, 2019, 2:52pm UTC](https://discourse.julialang.org/t/understanding-blink-windows/28852 "2019-09-17T14:52:52Z")

</div>

My goal is to write a function that fills a Blink window with a table using TableView as quickly as possible. To do this I want to load a Blink window once and then let it sit idle in the background until the user calls…

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

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