# Latest

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

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

**Page:** 1904

---

## [Performance of (a::AbstractType)(args...) function declarations](https://discourse.julialang.org/t/performance-of-a-abstracttype-args-function-declarations/29825)

<div class="topic-metadata">

**Author:** [@grahamas](https://discourse.julialang.org/u/grahamas)\
**Replies:** 3\
**Last updated:** [October 12, 2019, 6:45pm UTC](https://discourse.julialang.org/t/performance-of-a-abstracttype-args-function-declarations/29825 "2019-10-12T18:45:12Z")

</div>

I just finished refactoring my code to replace a lot of function calls of the form f(a::AbstractType, args…) with (a::AbstractType)(args…) since I can do that in 1.3, and it works out to slightly cleaner code. However, …

---

## [Help me optimize dynamic programming code](https://discourse.julialang.org/t/help-me-optimize-dynamic-programming-code/29794)

<div class="topic-metadata">

**Author:** [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Replies:** 7\
**Last updated:** [October 12, 2019, 5:36pm UTC](https://discourse.julialang.org/t/help-me-optimize-dynamic-programming-code/29794 "2019-10-12T17:36:21Z")

</div>

I am working on a dynamic programming assignment for macro-economics that has code in Matlab which I tried to translate to Julia. However I cannot get the performance to be what it should be. Here is the loop solving t…

---

## [IJulia weird problem on Win 10, v. 1903](https://discourse.julialang.org/t/ijulia-weird-problem-on-win-10-v-1903/29819)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 0\
**Last updated:** [October 12, 2019, 2:53pm UTC](https://discourse.julialang.org/t/ijulia-weird-problem-on-win-10-v-1903/29819 "2019-10-12T14:53:58Z")

</div>

I use IJulia (recent version) on Julia v. 1.2.0 for 64bit Windows 10, latest update. I have the weirdest problem with IJulia… but only sometimes. Here is what happens: Shift-return doesn’t execute Code cells, but shif…

---

## [Expected type promotion with user-defined type not happening](https://discourse.julialang.org/t/expected-type-promotion-with-user-defined-type-not-happening/29803)

<div class="topic-metadata">

**Author:** [@jonniedie](https://discourse.julialang.org/u/jonniedie)\
**Replies:** 3\
**Last updated:** [October 12, 2019, 12:18pm UTC](https://discourse.julialang.org/t/expected-type-promotion-with-user-defined-type-not-happening/29803 "2019-10-12T12:18:28Z")

</div>

I traced a bug in some of my code down to some behavior that I don’t quite understand regarding type promotion. I’m not sure if the issue is with the MonteCarloMeasurements package I’m using or my general misunderstandin…

---

## [Bad performance in simple array broadcast operations](https://discourse.julialang.org/t/bad-performance-in-simple-array-broadcast-operations/29771)

<div class="topic-metadata">

**Author:** [@tomas.bolano](https://discourse.julialang.org/u/tomas.bolano)\
**Replies:** 5\
**Last updated:** [October 12, 2019, 11:40am UTC](https://discourse.julialang.org/t/bad-performance-in-simple-array-broadcast-operations/29771 "2019-10-12T11:40:37Z")

</div>

Hi, I was rewriting some Matlab code into Julia, and I noticed that one function which used array broadcasting operations ran several times slower on Julia. I though this was really strange and I made a simple test func…

---

## [ANN: NewsAPI.jl](https://discourse.julialang.org/t/ann-newsapi-jl/29270)

<div class="topic-metadata">

**Author:** [@joshday](https://discourse.julialang.org/u/joshday)\
**Replies:** 9\
**Last updated:** [October 12, 2019, 6:52am UTC](https://discourse.julialang.org/t/ann-newsapi-jl/29270 "2019-10-12T06:52:45Z")

</div>

Hi everyone! I put together some utility functions for getting data from newsapi.org. Check it out!

---

## [How do I plot a matrix in Plots instead of gadfly](https://discourse.julialang.org/t/how-do-i-plot-a-matrix-in-plots-instead-of-gadfly/29801)

<div class="topic-metadata">

**Author:** [@StevenSiew](https://discourse.julialang.org/u/StevenSiew)\
**Replies:** 1\
**Last updated:** [October 12, 2019, 3:06am UTC](https://discourse.julialang.org/t/how-do-i-plot-a-matrix-in-plots-instead-of-gadfly/29801 "2019-10-12T03:06:42Z")

</div>

My attempt at producing an image of the Mandelbrot set using Gadfly const ImageWidth = 30 const ImageHeight = 30 const IterationLimit = 100 function Mandelbrot(c)::Int64 seed = 0.0 + 0.0im z = seed^2 + c …

---

## [Plots.jl: add 2d histogram with logarithmic bin colors](https://discourse.julialang.org/t/plots-jl-add-2d-histogram-with-logarithmic-bin-colors/29802)

<div class="topic-metadata">

**Author:** [@Sh4pe](https://discourse.julialang.org/u/Sh4pe)\
**Replies:** 0\
**Last updated:** [October 12, 2019, 12:22am UTC](https://discourse.julialang.org/t/plots-jl-add-2d-histogram-with-logarithmic-bin-colors/29802 "2019-10-12T00:22:43Z")

</div>

I want to use 2d histograms in Plots.jl, especially with the GR backend, that have logarithmic bin colors (log10). This appears not to be possible at the moment (or is it?). So I’ve started the very short draft PR #2208 …

---

## [Help fo working with Iters](https://discourse.julialang.org/t/help-fo-working-with-iters/29727)

<div class="topic-metadata">

**Author:** [@hasanOryx](https://discourse.julialang.org/u/hasanOryx)\
**Replies:** 21\
**Last updated:** [October 11, 2019, 11:44pm UTC](https://discourse.julialang.org/t/help-fo-working-with-iters/29727 "2019-10-11T23:44:24Z")

</div>

I’ve the below Python code: def initial\_trend(series, slen): sum = 0.0 for i in range(slen): sum += float(series\[i+slen\] - series\[i\]) / slen return sum / slen That is converted to the below Rust cod…

---

## [Julia: Symbol Lookup Error](https://discourse.julialang.org/t/julia-symbol-lookup-error/29797)

<div class="topic-metadata">

**Author:** [@natgeo-wong](https://discourse.julialang.org/u/natgeo-wong)\
**Replies:** 3\
**Last updated:** [October 11, 2019, 11:32pm UTC](https://discourse.julialang.org/t/julia-symbol-lookup-error/29797 "2019-10-11T23:32:09Z")

</div>

Hi! I’m currently using Julia on both a local laptop (macos) and a linux remote server. Julia has been working fine on my computer, but occasionally, on my linux remote server, I keep getting the following error when I…

---

## [Pkg.instantiate() for Flux model zoo](https://discourse.julialang.org/t/pkg-instantiate-for-flux-model-zoo/29781)

<div class="topic-metadata">

**Author:** [@chrisoei](https://discourse.julialang.org/u/chrisoei)\
**Replies:** 1\
**Last updated:** [October 11, 2019, 9:37pm UTC](https://discourse.julialang.org/t/pkg-instantiate-for-flux-model-zoo/29781 "2019-10-11T21:37:46Z")

</div>

Hi everyone, I’m trying to get the examples in the Flux model zoo to run, but I’m having problems in the Pkg.instantiate() step mentioned in the README. I’ve tried it using both Julia 1.2.0 and 1.0.5 on Xubuntu 18.04 (6…

---

## [loadODESolvers() not working](https://discourse.julialang.org/t/loadodesolvers-not-working/29796)

<div class="topic-metadata">

**Author:** [@Nirvik](https://discourse.julialang.org/u/Nirvik)\
**Replies:** 3\
**Last updated:** [October 11, 2019, 9:29pm UTC](https://discourse.julialang.org/t/loadodesolvers-not-working/29796 "2019-10-11T21:29:15Z")

</div>

I am using Windows 10 64 bit. I performed the following steps in Juno in Julia REPL: \] add ODEInterface build ODEInterface loadODESolvers() The ODEInterface package is added and built as normal however the loadODESo…

---

## [Calling Julia from Fortran?](https://discourse.julialang.org/t/calling-julia-from-fortran/29753)

<div class="topic-metadata">

**Author:** [@joe\_vallino](https://discourse.julialang.org/u/joe_vallino)\
**Replies:** 10\
**Last updated:** [October 11, 2019, 6:56pm UTC](https://discourse.julialang.org/t/calling-julia-from-fortran/29753 "2019-10-11T18:56:34Z")

</div>

I’m looking at moving some of my coding to Julia, and while calling Fortran from Julia seems straight forward, I haven’t found too much about calling Julia from Fortran. The reason is I have some Fortran code that calls…

---

## [Redefine Function as Variable](https://discourse.julialang.org/t/redefine-function-as-variable/29786)

<div class="topic-metadata">

**Author:** [@duncanam](https://discourse.julialang.org/u/duncanam)\
**Replies:** 3\
**Last updated:** [October 11, 2019, 6:44pm UTC](https://discourse.julialang.org/t/redefine-function-as-variable/29786 "2019-10-11T18:44:44Z")

</div>

Often I used my REPL for testing and scratch work. Thus, the variable x gets bound to quite a few things and I redefine it often. However, if I do: function x(y) return y+1 end and then later try x = 5 I am hit with: …

---

## [Boundserror in Zygote custom adjoint](https://discourse.julialang.org/t/boundserror-in-zygote-custom-adjoint/29739)

<div class="topic-metadata">

**Author:** [@jbmuir](https://discourse.julialang.org/u/jbmuir)\
**Replies:** 1\
**Last updated:** [October 11, 2019, 6:18pm UTC](https://discourse.julialang.org/t/boundserror-in-zygote-custom-adjoint/29739 "2019-10-11T18:18:25Z")

</div>

I’m learning how to define a custom adjoint in Zygote for a type and get a BoundsError testing the gradient for my example case. Code is as below (note that the adjoint definition is probably wrong, but the dimensions s…

---

## [Why I love Julia](https://discourse.julialang.org/t/why-i-love-julia/29489)

<div class="topic-metadata">

**Author:** [@kolia](https://discourse.julialang.org/u/kolia)\
**Replies:** 34\
**Last updated:** [October 11, 2019, 6:15pm UTC](https://discourse.julialang.org/t/why-i-love-julia/29489 "2019-10-11T18:15:16Z")

</div>

I just gave a talk at my company attempting to explain why we are all so excited about Julia in one hour. I tried to focus on the essence of it, borrowing material from the manual, Stephan’s “Unreasonable effectiveness o…

---

## [Outer Consturctor with Parametric Types + Iterator Question](https://discourse.julialang.org/t/outer-consturctor-with-parametric-types-iterator-question/29783)

<div class="topic-metadata">

**Author:** [@sstadick](https://discourse.julialang.org/u/sstadick)\
**Replies:** 1\
**Last updated:** [October 11, 2019, 4:41pm UTC](https://discourse.julialang.org/t/outer-consturctor-with-parametric-types-iterator-question/29783 "2019-10-11T16:41:49Z")

</div>

https://repl.it/repls/HilariousDentalBlocks When I try to create a Lapper, I get the following error. julia version 1.1.0  inputs = \[Interval(3, 5, true), Interval(4, 10, false), Interval(7, 12, true), Interval(9, 15,…

---

## [Puzzle with memory allocation](https://discourse.julialang.org/t/puzzle-with-memory-allocation/29780)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 2\
**Last updated:** [October 11, 2019, 3:14pm UTC](https://discourse.julialang.org/t/puzzle-with-memory-allocation/29780 "2019-10-11T15:14:42Z")

</div>

The line in the below code if inrange(... allocates for some reason a lot of memory. For the life of me I can’t figure out why. Any ideas? - # Initialize the output list 230953488 vlist= zeros(FInt, size…

---

## [Repeated measures 2 way ANOVA](https://discourse.julialang.org/t/repeated-measures-2-way-anova/375)

<div class="topic-metadata">

**Author:** [@grero](https://discourse.julialang.org/u/grero)\
**Replies:** 4\
**Last updated:** [October 11, 2019, 3:02pm UTC](https://discourse.julialang.org/t/repeated-measures-2-way-anova/375 "2019-10-11T15:02:23Z")

</div>

Hi group, I was wondering if anyone has julia code that can do repeated measures 2 way ANOVA? In the past, I’ve used the GLM package to do 2 way ANOVA, but it’s not clear to me how I would approach a repeated measures d…

---

## [Write a GPU/CPU agnostic package with Flux](https://discourse.julialang.org/t/write-a-gpu-cpu-agnostic-package-with-flux/29734)

<div class="topic-metadata">

**Author:** [@jonathan-laurent](https://discourse.julialang.org/u/jonathan-laurent)\
**Replies:** 5\
**Last updated:** [October 11, 2019, 1:34pm UTC](https://discourse.julialang.org/t/write-a-gpu-cpu-agnostic-package-with-flux/29734 "2019-10-11T13:34:56Z")

</div>

I am currently developing a Julia package based on Flux (namely an implementation of Deepmind’s AlphaZero algorithm) and I am looking for the best way to make it accessible to people with and without a GPU. Ideally, ena…

---

## [Array of StaticArrays to 2D array](https://discourse.julialang.org/t/array-of-staticarrays-to-2d-array/29772)

<div class="topic-metadata">

**Author:** [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Replies:** 1\
**Last updated:** [October 11, 2019, 12:34pm UTC](https://discourse.julialang.org/t/array-of-staticarrays-to-2d-array/29772 "2019-10-11T12:34:45Z")

</div>

StaticArrays documentation gives a way to convert a 2D array of values to a 1D array of StaticArrays: reinterpret(SVector{N,T}, vec(x)). However I cannot find it anywhere how to perform the opposite conversion - from a 1…

---

## [Can't build ODEInterface on MacOS, "ld: library not found for -ldylib1.o"](https://discourse.julialang.org/t/cant-build-odeinterface-on-macos-ld-library-not-found-for-ldylib1-o/29634)

<div class="topic-metadata">

**Author:** [@minkailin](https://discourse.julialang.org/u/minkailin)\
**Replies:** 7\
**Last updated:** [October 11, 2019, 8:55am UTC](https://discourse.julialang.org/t/cant-build-odeinterface-on-macos-ld-library-not-found-for-ldylib1-o/29634 "2019-10-11T08:55:12Z")

</div>

I’m trying to use ODEInterface and ODEInterfaceDiffEq but encountered the following problem. I’m not sure what the issue is or how to resolve it? I am using Julia 1.0.3 on macOS Mojave 10.14.6.

---

## [Circumflex (ê) with Juno in REPL](https://discourse.julialang.org/t/circumflex-e-with-juno-in-repl/29762)

<div class="topic-metadata">

**Author:** [@alea](https://discourse.julialang.org/u/alea)\
**Replies:** 2\
**Last updated:** [October 11, 2019, 6:08am UTC](https://discourse.julialang.org/t/circumflex-e-with-juno-in-repl/29762 "2019-10-11T06:08:50Z")

</div>

Hello, I can’t just get the circumflex (ê) in Juno’s REPL. The accent is easily entered in the other Juno windows, as well as in any terminal by typing ^ then e. Ctrl+Shift+u, then ea works, but it’s not very practica…

---

## [JSON3: create json using Dict() with integer keys](https://discourse.julialang.org/t/json3-create-json-using-dict-with-integer-keys/29707)

<div class="topic-metadata">

**Author:** [@Elmer\_Cusipuma](https://discourse.julialang.org/u/Elmer_Cusipuma)\
**Replies:** 3\
**Last updated:** [October 11, 2019, 5:53am UTC](https://discourse.julialang.org/t/json3-create-json-using-dict-with-integer-keys/29707 "2019-10-11T05:53:03Z")

</div>

I have found that when the following is run, JSON’s converts int dictionary keys to strings. julia\> using JSON3 julia\> a1 = Dict(1 =\> "one", 2 =\> "two", 3 =\> "three"); julia\> json = JSON3.write(a1) "{\\"2\\":\\"two\\",\\"3…

---

## [Pass additional parameters to affect! in solving ODEs](https://discourse.julialang.org/t/pass-additional-parameters-to-affect-in-solving-odes/29755)

<div class="topic-metadata">

**Author:** [@biona001](https://discourse.julialang.org/u/biona001)\
**Replies:** 2\
**Last updated:** [October 11, 2019, 5:32am UTC](https://discourse.julialang.org/t/pass-additional-parameters-to-affect-in-solving-odes/29755 "2019-10-11T05:32:38Z")

</div>

Hello community, I’m trying to make a lot of ODE simulations and each has a specific callback condition. In affect!, I need to change a few compartments of integrator.u according to some known values. How can I do this? …

---

## [Juno, julia-client install error](https://discourse.julialang.org/t/juno-julia-client-install-error/29570)

<div class="topic-metadata">

**Author:** [@zhangliye](https://discourse.julialang.org/u/zhangliye)\
**Replies:** 6\
**Last updated:** [October 11, 2019, 4:20am UTC](https://discourse.julialang.org/t/juno-julia-client-install-error/29570 "2019-10-11T04:20:28Z")

</div>

I install JUNO from the GUI in Atom caused by a bug of Atom not solved at present. I tried to install julia-client from the command console. After running the command of “apm install julia-client” , I got the following e…

---

## [\[ANN\] SatelliteToolbox v0.6.3](https://discourse.julialang.org/t/ann-satellitetoolbox-v0-6-3/29760)

<div class="topic-metadata">

**Author:** [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Replies:** 0\
**Last updated:** [October 11, 2019, 2:07am UTC](https://discourse.julialang.org/t/ann-satellitetoolbox-v0-6-3/29760 "2019-10-11T02:07:35Z")

</div>

Hi! I have just tagged the v0.6.3 of SatelliteToolbox.jl (it should be accepted soon, the PR can be seen here). This is a very interesting release. The modifications were: A bug in eclipse time computation was fixed. T…

---

## [Image resizing while preserving average](https://discourse.julialang.org/t/image-resizing-while-preserving-average/29704)

<div class="topic-metadata">

**Author:** [@johnheyer](https://discourse.julialang.org/u/johnheyer)\
**Replies:** 14\
**Last updated:** [October 10, 2019, 11:23pm UTC](https://discourse.julialang.org/t/image-resizing-while-preserving-average/29704 "2019-10-10T23:23:25Z")

</div>

Hello! I am new to Julia and need some help in image processing. The arrays which I am working with are histogram 2D probability mass functions, so maintaining a sum of 1 in the image is important. What’s interesting, …

---

## [Results of Julia code different slightly than equivalent Python code](https://discourse.julialang.org/t/results-of-julia-code-different-slightly-than-equivalent-python-code/29756)

<div class="topic-metadata">

**Author:** [@hasanOryx](https://discourse.julialang.org/u/hasanOryx)\
**Replies:** 6\
**Last updated:** [October 10, 2019, 11:10pm UTC](https://discourse.julialang.org/t/results-of-julia-code-different-slightly-than-equivalent-python-code/29756 "2019-10-10T23:10:39Z")

</div>

I’m converting a Python code to Julia, I’m newbie to both in real, and got slight different in the output, which could be related to the indexes difference between the 2 languages but not sure: Python code is: def trip…

---

## [Missing condition in "elseif" at none](https://discourse.julialang.org/t/missing-condition-in-elseif-at-none/29754)

<div class="topic-metadata">

**Author:** [@hasanOryx](https://discourse.julialang.org/u/hasanOryx)\
**Replies:** 5\
**Last updated:** [October 10, 2019, 9:59pm UTC](https://discourse.julialang.org/t/missing-condition-in-elseif-at-none/29754 "2019-10-10T21:59:33Z")

</div>

I got this error: syntax: missing condition in "elseif" at none:13 for this code, what the mistake I made? function triple\_exponential\_smoothing(series, slen, α, β, γ, n\_preds) seasonals = initial\_seasonal\_compone…

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

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