# Latest

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

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

**Page:** 1859

---

## [What is going on with memory locality when accessing an array?](https://discourse.julialang.org/t/what-is-going-on-with-memory-locality-when-accessing-an-array/32486)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 6\
**Last updated:** [December 20, 2019, 6:37pm UTC](https://discourse.julialang.org/t/what-is-going-on-with-memory-locality-when-accessing-an-array/32486 "2019-12-20T18:37:23Z")

</div>

I presented an example of access to an array: read and write. The aspect of this that puzzles me is the unexpected win of the storage scheme where the accessed entries of the array are not adjacent in memory. Is there a…

---

## [ANN: DynamicHMC 2.0](https://discourse.julialang.org/t/ann-dynamichmc-2-0/28314)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 57\
**Last updated:** [December 20, 2019, 6:16pm UTC](https://discourse.julialang.org/t/ann-dynamichmc-2-0/28314 "2019-12-20T18:16:49Z")

</div>

DynamicHMC 2.0 was just released. I wrote a blog post about the changes and the new features. There are breaking API changes, please read the documentation. Feel free to ask support questions here.

---

## [Different loss with Zygote when taking gradients vs. without](https://discourse.julialang.org/t/different-loss-with-zygote-when-taking-gradients-vs-without/32523)

<div class="topic-metadata">

**Author:** [@holylorenzo](https://discourse.julialang.org/u/holylorenzo)\
**Replies:** 0\
**Last updated:** [December 20, 2019, 6:13pm UTC](https://discourse.julialang.org/t/different-loss-with-zygote-when-taking-gradients-vs-without/32523 "2019-12-20T18:13:06Z")

</div>

I am working on the newest Flux branch and noticed some weird behavior. When I calculate the loss of my model’s outputs I get the following number: \> y\_pred = model(x) \> loss(y\_pred, y) 0.003791215f0 However, doing th…

---

## [Matrix Free transpose jacobian using AD](https://discourse.julialang.org/t/matrix-free-transpose-jacobian-using-ad/32511)

<div class="topic-metadata">

**Author:** [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Replies:** 7\
**Last updated:** [December 20, 2019, 4:35pm UTC](https://discourse.julialang.org/t/matrix-free-transpose-jacobian-using-ad/32511 "2019-12-20T16:35:43Z")

</div>

Hi, I would like to evaluate the transpose of the jacobian of a function F using ForwardDiff.jl or any AD. Is it possible? I read that reverse mode would provide this but failed to achieve this using ReverseDiff.jl. I …

---

## [Is there a simple way to generate uniform points within a given region?](https://discourse.julialang.org/t/is-there-a-simple-way-to-generate-uniform-points-within-a-given-region/29800)

<div class="topic-metadata">

**Author:** [@linwaytin](https://discourse.julialang.org/u/linwaytin)\
**Replies:** 6\
**Last updated:** [December 20, 2019, 3:28pm UTC](https://discourse.julialang.org/t/is-there-a-simple-way-to-generate-uniform-points-within-a-given-region/29800 "2019-12-20T15:28:28Z")

</div>

I’m looking for a way to generate a mesh with given region. Basically I want things like the Fig 1 in https://doc.freefem.org/tutorials/poisson.html. What I need are just the vertices. The triangles are not important t…

---

## [Agent Based Model visualization in Gtk](https://discourse.julialang.org/t/agent-based-model-visualization-in-gtk/32518)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 0\
**Last updated:** [December 20, 2019, 3:13pm UTC](https://discourse.julialang.org/t/agent-based-model-visualization-in-gtk/32518 "2019-12-20T15:13:51Z")

</div>

Hi all- I would like to create a simple 2D visualization of an agent based model in Gtk. My current approach involves creating a window and drawing colored rectangles to represent agents, following the online documenta…

---

## [Can this loop be optimized further?](https://discourse.julialang.org/t/can-this-loop-be-optimized-further/32510)

<div class="topic-metadata">

**Author:** [@Dictino](https://discourse.julialang.org/u/Dictino)\
**Replies:** 7\
**Last updated:** [December 20, 2019, 2:51pm UTC](https://discourse.julialang.org/t/can-this-loop-be-optimized-further/32510 "2019-12-20T14:51:01Z")

</div>

I have this function to find an element in an array: function my\_findfirst(element,array) for i=1:length(array) if @inbounds (array\[i\]==element) return i end end return nothing end I’ve created thi…

---

## [JuliaCon 2020: Call for Mentors](https://discourse.julialang.org/t/juliacon-2020-call-for-mentors/32515)

<div class="topic-metadata">

**Author:** [@mcmcgrath13](https://discourse.julialang.org/u/mcmcgrath13)\
**Replies:** 0\
**Last updated:** [December 20, 2019, 2:33pm UTC](https://discourse.julialang.org/t/juliacon-2020-call-for-mentors/32515 "2019-12-20T14:33:06Z")

</div>

JuliaCon offers a mentoring program for new presenters both for feedback on their submissions as well as on their talk. Mentors are needed for both of these phases (and it’s also possible to mentor someone through both!…

---

## [JuliaCon 2020: Mentoring Available](https://discourse.julialang.org/t/juliacon-2020-mentoring-available/32516)

<div class="topic-metadata">

**Author:** [@mcmcgrath13](https://discourse.julialang.org/u/mcmcgrath13)\
**Replies:** 0\
**Last updated:** [December 20, 2019, 2:35pm UTC](https://discourse.julialang.org/t/juliacon-2020-mentoring-available/32516 "2019-12-20T14:35:48Z")

</div>

Are you thinking about presenting at JuliaCon for the first time? Mentors are available to help brainstorm ideas for proposals, review proposals, or help hone your presentation! Sign up here!

---

## [JuliaCon 2020: Funding Opportunity](https://discourse.julialang.org/t/juliacon-2020-funding-opportunity/32517)

<div class="topic-metadata">

**Author:** [@mcmcgrath13](https://discourse.julialang.org/u/mcmcgrath13)\
**Replies:** 0\
**Last updated:** [December 20, 2019, 2:45pm UTC](https://discourse.julialang.org/t/juliacon-2020-funding-opportunity/32517 "2019-12-20T14:45:32Z")

</div>

JuliaCon strives to be accessible to the entire Julia community. As part of these efforts, limited funding is available to support the attendance of people who would not otherwise be able to attend. Funding is availabl…

---

## [Number of digits in xticks for Plots.jl](https://discourse.julialang.org/t/number-of-digits-in-xticks-for-plots-jl/14533)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 6\
**Last updated:** [December 20, 2019, 2:25pm UTC](https://discourse.julialang.org/t/number-of-digits-in-xticks-for-plots-jl/14533 "2019-12-20T14:25:23Z")

</div>

Hi all- I have a crowding issue on the scale of my x-axis because too many digits are displayed. I tried to round the values I pass to xticks, but that did not help. Is there any way to control the number of digits that…

---

## [Quick question on colors in a contour plot](https://discourse.julialang.org/t/quick-question-on-colors-in-a-contour-plot/32493)

<div class="topic-metadata">

**Author:** [@klaff](https://discourse.julialang.org/u/klaff)\
**Replies:** 4\
**Last updated:** [December 20, 2019, 2:09pm UTC](https://discourse.julialang.org/t/quick-question-on-colors-in-a-contour-plot/32493 "2019-12-20T14:09:13Z")

</div>

Hi, I’m making a contour plot using something like using Plots p1 = plot(xoffsets, zerrs, out, st=:contour, levels=0.0:0.05:1.00) The plot works but I want to change the color series (the default colors for values nea…

---

## [Missing package error when running script with Julia GitHub Actions](https://discourse.julialang.org/t/missing-package-error-when-running-script-with-julia-github-actions/32509)

<div class="topic-metadata">

**Author:** [@logankilpatrick](https://discourse.julialang.org/u/logankilpatrick)\
**Replies:** 2\
**Last updated:** [December 20, 2019, 1:57pm UTC](https://discourse.julialang.org/t/missing-package-error-when-running-script-with-julia-github-actions/32509 "2019-12-20T13:57:26Z")

</div>

Hey all, I am trying to run a script via GitHub actions. I set up and build Julia via those respective GitHub actions. But when I run my script, line 1 is using StackOverflow and even though I see it show up as installed…

---

## [Dropping support for Emacs 23 in julia-emacs](https://discourse.julialang.org/t/dropping-support-for-emacs-23-in-julia-emacs/31001)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 1\
**Last updated:** [December 20, 2019, 12:33pm UTC](https://discourse.julialang.org/t/dropping-support-for-emacs-23-in-julia-emacs/31001 "2019-12-20T12:33:31Z")

</div>

We are considering dropping support for Emacs 23 for julia-emacs. If you still use Emacs 23 in a legacy environment, we would like to hear from you — please comment here, or in the issue https://github.com/JuliaEditorSu…

---

## [Package registration refused](https://discourse.julialang.org/t/package-registration-refused/32507)

<div class="topic-metadata">

**Author:** [@Johncowk](https://discourse.julialang.org/u/Johncowk)\
**Replies:** 1\
**Last updated:** [December 20, 2019, 11:43am UTC](https://discourse.julialang.org/t/package-registration-refused/32507 "2019-12-20T11:43:58Z")

</div>

Hello, I wrote a module to perform Detrended Cross-Correlation Analysis, called DCCA.jl (quite straightforward) which I want to register but it gets refused on that account that the name has less that 5 letters. Yet pac…

---

## [Strange behavior in live line-evaluation](https://discourse.julialang.org/t/strange-behavior-in-live-line-evaluation/32497)

<div class="topic-metadata">

**Author:** [@yuxi.liu](https://discourse.julialang.org/u/yuxi.liu)\
**Replies:** 1\
**Last updated:** [December 20, 2019, 10:40am UTC](https://discourse.julialang.org/t/strange-behavior-in-live-line-evaluation/32497 "2019-12-20T10:40:07Z")

</div>

Pressing ctrl+enter at the first line causes both lines to be activated. 0 "0"=="0" This also happens for 0 '0'=='0' and if more lines are inserted, it would be evaluated until the end: 0 '0'=='0' '0'=='0' '0'=='0'

---

## [Ignoring NaN in elementwise aggregations](https://discourse.julialang.org/t/ignoring-nan-in-elementwise-aggregations/32431)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 7\
**Last updated:** [December 20, 2019, 9:43am UTC](https://discourse.julialang.org/t/ignoring-nan-in-elementwise-aggregations/32431 "2019-12-20T09:43:04Z")

</div>

I would like to do calculations like mean(a\_bunch\_of\_similar\_arrays) but with NaNs quietly ignored. MWE with an inefficient and inelegant solution: A1 = \[NaN 1; 2 3\] A2 = \[1 NaN; 2 3\] As = \[A1, A2\] function elemen…

---

## [Multiply each slice of an array by a different number](https://discourse.julialang.org/t/multiply-each-slice-of-an-array-by-a-different-number/32501)

<div class="topic-metadata">

**Author:** [@jw3126](https://discourse.julialang.org/u/jw3126)\
**Replies:** 7\
**Last updated:** [December 20, 2019, 9:05am UTC](https://discourse.julialang.org/t/multiply-each-slice-of-an-array-by-a-different-number/32501 "2019-12-20T09:05:59Z")

</div>

I want to multiply each slice of an array by a different number. I want to do it for arbitrary array and slice dimensions, inplace and efficient if possible. How to do this? Here is an example: Multipy each row of a mat…

---

## [How to manually install packages on a HPC without internet?](https://discourse.julialang.org/t/how-to-manually-install-packages-on-a-hpc-without-internet/32446)

<div class="topic-metadata">

**Author:** [@Massimiliano\_Comin](https://discourse.julialang.org/u/Massimiliano_Comin)\
**Replies:** 7\
**Last updated:** [December 20, 2019, 8:40am UTC](https://discourse.julialang.org/t/how-to-manually-install-packages-on-a-hpc-without-internet/32446 "2019-12-20T08:40:09Z")

</div>

Hello, I want to setup Julia with (of course) some packages on a HPC which does not have access to internet. This means I can only SCP from my local machine to the HPC. In this case, how can I manually install packages…

---

## [Error in example code for "global binding during remote execution" in Julia doc](https://discourse.julialang.org/t/error-in-example-code-for-global-binding-during-remote-execution-in-julia-doc/32502)

<div class="topic-metadata">

**Author:** [@Sijun](https://discourse.julialang.org/u/Sijun)\
**Replies:** 0\
**Last updated:** [December 20, 2019, 7:54am UTC](https://discourse.julialang.org/t/error-in-example-code-for-global-binding-during-remote-execution-in-julia-doc/32502 "2019-12-20T07:54:56Z")

</div>

In section title What are the possible causes of an UndefVarError during remote execution? in page 427 Julia 1.3.0 doc pdf, there is the following code example: @everywhere module Foo function foo() gl…

---

## [Julia 1.3 and Flux and Metalhead: LoadError? Also issues on cocalc and paid JuliaBox (relates to Tanmay Bakshi's book)](https://discourse.julialang.org/t/julia-1-3-and-flux-and-metalhead-loaderror-also-issues-on-cocalc-and-paid-juliabox-relates-to-tanmay-bakshis-book/32489)

<div class="topic-metadata">

**Author:** [@hhb](https://discourse.julialang.org/u/hhb)\
**Replies:** 0\
**Last updated:** [December 19, 2019, 5:46pm UTC](https://discourse.julialang.org/t/julia-1-3-and-flux-and-metalhead-loaderror-also-issues-on-cocalc-and-paid-juliabox-relates-to-tanmay-bakshis-book/32489 "2019-12-19T17:46:05Z")

</div>

Hi, I am working through Tanmay Bakshi’s lovely book and get errors when it gets really interesting (in the Machine Learning chapter). I have Julia 1.3 on a mac, with Flux downgraded to 0.9 to have the Metalhead comp…

---

## [Composite types array, and composite type with array fields](https://discourse.julialang.org/t/composite-types-array-and-composite-type-with-array-fields/32466)

<div class="topic-metadata">

**Author:** [@garychow](https://discourse.julialang.org/u/garychow)\
**Replies:** 5\
**Last updated:** [December 20, 2019, 3:43am UTC](https://discourse.julialang.org/t/composite-types-array-and-composite-type-with-array-fields/32466 "2019-12-20T03:43:18Z")

</div>

Hi, I am using CUDAnative now and wonder if anyone could point me to a correct direction such that these operations is possible. Is there anyone else found that it will be easier if these 2 functions are supported? I un…

---

## [Differences in collecting algebraic terms or not](https://discourse.julialang.org/t/differences-in-collecting-algebraic-terms-or-not/32488)

<div class="topic-metadata">

**Author:** [@Donkeyfish87](https://discourse.julialang.org/u/Donkeyfish87)\
**Replies:** 5\
**Last updated:** [December 19, 2019, 9:34pm UTC](https://discourse.julialang.org/t/differences-in-collecting-algebraic-terms-or-not/32488 "2019-12-19T21:34:11Z")

</div>

Why is there a difference between function sum\_of\_squares(n::Int) div(n\*(n+1)\*(2n+1), 6) end function square\_of\_sum(n::Int) div(n\*(n+1),2)^2 end function difference(n::Int) square\_of\_sum(n) - sum\_of\_square…

---

## [Efficient way to update a DataFrame stored in a bson file](https://discourse.julialang.org/t/efficient-way-to-update-a-dataframe-stored-in-a-bson-file/32482)

<div class="topic-metadata">

**Author:** [@fipelle](https://discourse.julialang.org/u/fipelle)\
**Replies:** 3\
**Last updated:** [December 19, 2019, 8:30pm UTC](https://discourse.julialang.org/t/efficient-way-to-update-a-dataframe-stored-in-a-bson-file/32482 "2019-12-19T20:30:13Z")

</div>

Hi, I have two DataFrames: df and new\_df. These DataFrames have the same structure (i.e., the same columns). df is stored in a bson file and new\_df is computed by some code. I was wondering what is the most efficient w…

---

## [Julia 1.3.1 testing period](https://discourse.julialang.org/t/julia-1-3-1-testing-period/32492)

<div class="topic-metadata">

**Author:** [@ararslan](https://discourse.julialang.org/u/ararslan)\
**Replies:** 0\
**Last updated:** [December 19, 2019, 7:23pm UTC](https://discourse.julialang.org/t/julia-1-3-1-testing-period/32492 "2019-12-19T19:23:16Z")

</div>

The release-1.3 branch on the Julia repository now contains the set of commits we’re planning to tag as v1.3.1, the first patch release in the 1.3 series. The list of commits included since v1.3.0 is available here. As a…

---

## [Julia 1.3 and Metalhead](https://discourse.julialang.org/t/julia-1-3-and-metalhead/32453)

<div class="topic-metadata">

**Author:** [@hhb](https://discourse.julialang.org/u/hhb)\
**Replies:** 2\
**Last updated:** [December 19, 2019, 5:38pm UTC](https://discourse.julialang.org/t/julia-1-3-and-metalhead/32453 "2019-12-19T17:38:18Z")

</div>

Hello, just downloaded the fresh 1.3 binary from the website. First thing done was using Pkg Pkg.add("Flux") So far so good. Then Pkg.add("Metalhead") does NOT work, I get the stuff below. I did nuke the .…

---

## [How to obtain local variables in functions for nlsolve or minimize](https://discourse.julialang.org/t/how-to-obtain-local-variables-in-functions-for-nlsolve-or-minimize/32437)

<div class="topic-metadata">

**Author:** [@RangeFu](https://discourse.julialang.org/u/RangeFu)\
**Replies:** 1\
**Last updated:** [December 19, 2019, 2:53pm UTC](https://discourse.julialang.org/t/how-to-obtain-local-variables-in-functions-for-nlsolve-or-minimize/32437 "2019-12-19T14:53:00Z")

</div>

Hi, I was wondering what is the best practice to export local variables in a objective function for optimization or linear solvers. For example, I have a function that like: function example(x) b = sum(x) retur…

---

## [Wrapping c code and packaging the wrapper](https://discourse.julialang.org/t/wrapping-c-code-and-packaging-the-wrapper/32363)

<div class="topic-metadata">

**Author:** [@AlfTetzlaff](https://discourse.julialang.org/u/AlfTetzlaff)\
**Replies:** 3\
**Last updated:** [December 19, 2019, 1:43pm UTC](https://discourse.julialang.org/t/wrapping-c-code-and-packaging-the-wrapper/32363 "2019-12-19T13:43:52Z")

</div>

Hey everybody! I want to wrap a .so library file which provides access to the cameras of a certain vendor (ZWO ASI). For a start I need it for home use with possible distribution later. However, I don’t manage to create…

---

## [Distributions.jl is there a deterministic distribution?](https://discourse.julialang.org/t/distributions-jl-is-there-a-deterministic-distribution/32475)

<div class="topic-metadata">

**Author:** [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Replies:** 4\
**Last updated:** [December 19, 2019, 1:18pm UTC](https://discourse.julialang.org/t/distributions-jl-is-there-a-deterministic-distribution/32475 "2019-12-19T13:18:37Z")

</div>

I’m working with a structure that has a Distribution field. However I would like it to be able to also take a fixed value without the need to make a Union{Distribution,Real} field type. I think the Dirac distribution doe…

---

## [Avoid unnecessary computations with (sparse) Arrays](https://discourse.julialang.org/t/avoid-unnecessary-computations-with-sparse-arrays/32473)

<div class="topic-metadata">

**Author:** [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Replies:** 2\
**Last updated:** [December 19, 2019, 1:17pm UTC](https://discourse.julialang.org/t/avoid-unnecessary-computations-with-sparse-arrays/32473 "2019-12-19T13:17:21Z")

</div>

Hi, I would like to avoid unnecessary computations in computing shifts of matrices like for example 0\*I + 1\*J. I thought about the code below, but this is not really a viable strategy because I would like to dispatch on…

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

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