# Latest

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

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

**Page:** 1613

---

## [Inconsistent typing making adding arrays and adding a vector to the end of an array difficult](https://discourse.julialang.org/t/inconsistent-typing-making-adding-arrays-and-adding-a-vector-to-the-end-of-an-array-difficult/47662)

<div class="topic-metadata">

**Author:** [@fusion809](https://discourse.julialang.org/u/fusion809)\
**Replies:** 27\
**Last updated:** [October 4, 2020, 1:48pm UTC](https://discourse.julialang.org/t/inconsistent-typing-making-adding-arrays-and-adding-a-vector-to-the-end-of-an-array-difficult/47662 "2020-10-04T13:48:49Z")

</div>

I’m surprised that I actually found something scientific-computing related that is easier for me to do in JavaScript than it is in Julia. I’ve written functions that use the 4/5th order Runge-Kutta-Fehlberg method to sol…

---

## [Suggestions needed: speed up optimization](https://discourse.julialang.org/t/suggestions-needed-speed-up-optimization/47449)

<div class="topic-metadata">

**Author:** [@DShiu](https://discourse.julialang.org/u/DShiu)\
**Replies:** 31\
**Last updated:** [October 4, 2020, 7:06pm UTC](https://discourse.julialang.org/t/suggestions-needed-speed-up-optimization/47449 "2020-10-04T19:06:19Z")

</div>

I need to maximize a likelihood function which has 18 parameters using a large sample with 1 million observations. The objective function is defined as function loglike(θ, x, y, R, c, d, p0, B) prob = \[choice\_prob\_n…

---

## [Multiply dense arrays](https://discourse.julialang.org/t/multiply-dense-arrays/47724)

<div class="topic-metadata">

**Author:** [@jleman](https://discourse.julialang.org/u/jleman)\
**Replies:** 14\
**Last updated:** [October 4, 2020, 6:38pm UTC](https://discourse.julialang.org/t/multiply-dense-arrays/47724 "2020-10-04T18:38:11Z")

</div>

Is there a way to speed up basic multiplication of dense arrays? I have the following: using BenchmarkTools multiplyAndSum(Gmρ,Gρq) = sum(Gmρ .\* Gρq) dim = 500 #target is 3000 Gmρ = \[rand(dim,18) for \_ in 1:1024\] Gρq…

---

## [Promote\_type in @generated](https://discourse.julialang.org/t/promote-type-in-generated/47729)

<div class="topic-metadata">

**Author:** [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Replies:** 8\
**Last updated:** [October 4, 2020, 5:16pm UTC](https://discourse.julialang.org/t/promote-type-in-generated/47729 "2020-10-04T17:16:44Z")

</div>

Hi, I want to write toggle, a typestable version of the q ? a : b syntax. What I am writing now has the disadvantage of evaluating both a and b for all values of q. A macro might save the day, but this is not the poin…

---

## [How to deal with these Float32\[1.4765211f6\]?](https://discourse.julialang.org/t/how-to-deal-with-these-float32-1-4765211f6/47741)

<div class="topic-metadata">

**Author:** [@ZhouZhuofei](https://discourse.julialang.org/u/ZhouZhuofei)\
**Replies:** 2\
**Last updated:** [October 4, 2020, 4:23pm UTC](https://discourse.julialang.org/t/how-to-deal-with-these-float32-1-4765211f6/47741 "2020-10-04T16:23:07Z")

</div>

my code here: julia\> data\_y 255-element Array{Any,1}: Float32\[4805.912\] Float32\[10600.066\] Float32\[16394.223\] Float32\[22188.377\] Float32\[27982.531\] Float32\[33776.684\] Float32\[39570.844\] Float32\[45364.992\] Float…

---

## [Failure with \`lshr\_int\` (intrinsic for \>\>) on UInt256 type](https://discourse.julialang.org/t/failure-with-lshr-int-intrinsic-for-on-uint256-type/47738)

<div class="topic-metadata">

**Author:** [@rfourquet](https://discourse.julialang.org/u/rfourquet)\
**Replies:** 5\
**Last updated:** [October 4, 2020, 4:17pm UTC](https://discourse.julialang.org/t/failure-with-lshr-int-intrinsic-for-on-uint256-type/47738 "2020-10-04T16:17:51Z")

</div>

Basically lshr\_int works as expected when called directly, but not when wrapped in a function. I need to understand better the failure to find a proper fix in BitIntegers. Here is a demo: julia\> using BitIntegers; x = r…

---

## [Operations on elements of a common index of an array of matrices](https://discourse.julialang.org/t/operations-on-elements-of-a-common-index-of-an-array-of-matrices/47715)

<div class="topic-metadata">

**Author:** [@jleman](https://discourse.julialang.org/u/jleman)\
**Replies:** 7\
**Last updated:** [October 4, 2020, 3:05pm UTC](https://discourse.julialang.org/t/operations-on-elements-of-a-common-index-of-an-array-of-matrices/47715 "2020-10-04T15:05:06Z")

</div>

I have an array of matrices. Is it possible to update groups of common indices in place? The code below doesn’t work but I think conveys what I am trying to do. Yes it would be easier to do this with a 3D matrix, but …

---

## [Where to find tutors for Julia?](https://discourse.julialang.org/t/where-to-find-tutors-for-julia/47701)

<div class="topic-metadata">

**Author:** [@DShiu](https://discourse.julialang.org/u/DShiu)\
**Replies:** 4\
**Last updated:** [October 4, 2020, 1:02pm UTC](https://discourse.julialang.org/t/where-to-find-tutors-for-julia/47701 "2020-10-04T13:02:28Z")

</div>

I started using Julia for a research project with a learning by doing attitude. Before heading to my project, I learned basic Julia syntax and features. Now I have been working on my project for a couple of weeks. Since …

---

## [Numerical Continuation in Julia?](https://discourse.julialang.org/t/numerical-continuation-in-julia/5522)

<div class="topic-metadata">

**Author:** [@s-marashi](https://discourse.julialang.org/u/s-marashi)\
**Replies:** 9\
**Last updated:** [October 4, 2020, 12:49pm UTC](https://discourse.julialang.org/t/numerical-continuation-in-julia/5522 "2020-10-04T12:49:44Z")

</div>

What are available options for numerical continuation in Julia? While it’s irrelated does any body know about Auto software?

---

## [Objects whose structure can be redefined](https://discourse.julialang.org/t/objects-whose-structure-can-be-redefined/47733)

<div class="topic-metadata">

**Author:** [@fusion809](https://discourse.julialang.org/u/fusion809)\
**Replies:** 8\
**Last updated:** [October 4, 2020, 11:30am UTC](https://discourse.julialang.org/t/objects-whose-structure-can-be-redefined/47733 "2020-10-04T11:30:17Z")

</div>

One thing I’ve noticed about Julia that is a little frustrating is that if I define an object like this: struct paramObj g::Float64 l::Float64 end params = paramObj(9.81, 1.0); and then import a file that contai…

---

## [Comparing functions with their alias in GLM.jl](https://discourse.julialang.org/t/comparing-functions-with-their-alias-in-glm-jl/47593)

<div class="topic-metadata">

**Author:** [@yordiak](https://discourse.julialang.org/u/yordiak)\
**Replies:** 13\
**Last updated:** [October 4, 2020, 8:34am UTC](https://discourse.julialang.org/t/comparing-functions-with-their-alias-in-glm-jl/47593 "2020-10-04T08:34:59Z")

</div>

Not sure how clear the title is or whether this is the right place for asking the following question, but any way… :slight\_smile: I am testing the GLM package mostly for educational purposes. In the package documentati…

---

## [Strange errors occurred when I optimized with Zygote and Optim](https://discourse.julialang.org/t/strange-errors-occurred-when-i-optimized-with-zygote-and-optim/47461)

<div class="topic-metadata">

**Author:** [@F-YF](https://discourse.julialang.org/u/F-YF)\
**Replies:** 3\
**Last updated:** [October 4, 2020, 7:09am UTC](https://discourse.julialang.org/t/strange-errors-occurred-when-i-optimized-with-zygote-and-optim/47461 "2020-10-04T07:09:01Z")

</div>

Why do I get a bivariate gradient function when I optimize the objective function?How can I solve it? using Zygote using Optim using RecursiveArrayTools #This is the target function that I’m optimizing function ge…

---

## [Flux model on CPU runs slowly](https://discourse.julialang.org/t/flux-model-on-cpu-runs-slowly/47723)

<div class="topic-metadata">

**Author:** [@AquaIndigo](https://discourse.julialang.org/u/AquaIndigo)\
**Replies:** 3\
**Last updated:** [October 4, 2020, 2:54am UTC](https://discourse.julialang.org/t/flux-model-on-cpu-runs-slowly/47723 "2020-10-04T02:54:10Z")

</div>

I find the Flux model on CPU runs more slowly than that on GPU: julia\> m = Chain( Dense(2250, 500, σ), Dense(500, 50, tanh), Dense(50, 7, σ)); julia\> X = Float32.(X); julia\> size(X) (…

---

## [Join Dataframes on different IDs within date range](https://discourse.julialang.org/t/join-dataframes-on-different-ids-within-date-range/36425)

<div class="topic-metadata">

**Author:** [@mp-crypto](https://discourse.julialang.org/u/mp-crypto)\
**Replies:** 1\
**Last updated:** [October 4, 2020, 2:05am UTC](https://discourse.julialang.org/t/join-dataframes-on-different-ids-within-date-range/36425 "2020-10-04T02:05:42Z")

</div>

Hello, I am trying to merge two datasets. I am using query (as in the code below), but I should merge on i.ticker NOT equals j.ticker. Basically, I should merge to a focal i.ticker all other j.tickers whose i.datestart\<j…

---

## [Checking if variable is a type of number](https://discourse.julialang.org/t/checking-if-variable-is-a-type-of-number/47716)

<div class="topic-metadata">

**Author:** [@josef](https://discourse.julialang.org/u/josef)\
**Replies:** 1\
**Last updated:** [October 3, 2020, 11:49pm UTC](https://discourse.julialang.org/t/checking-if-variable-is-a-type-of-number/47716 "2020-10-03T23:49:26Z")

</div>

If I want to check if a variable is a number what is a succinct way to do this? For example I can do something like: if typeof(x) == Int64 || typeof(x) == Float64 #do something else But the above wouldn’t capture …

---

## [Changing the values of axes without resizing the image/figure in Plots.jl](https://discourse.julialang.org/t/changing-the-values-of-axes-without-resizing-the-image-figure-in-plots-jl/47702)

<div class="topic-metadata">

**Author:** [@libensvivit](https://discourse.julialang.org/u/libensvivit)\
**Replies:** 4\
**Last updated:** [October 3, 2020, 9:53pm UTC](https://discourse.julialang.org/t/changing-the-values-of-axes-without-resizing-the-image-figure-in-plots-jl/47702 "2020-10-03T21:53:20Z")

</div>

Hey, I have an image of 300x300 pixels loaded in Plots and I’m having a hard time modifying the axes without altering the image. If I change the xlims, the image gets resized. If I try xticks, it gets weird if I pass 30…

---

## [\[Question\] Distributions.jl with CUDA](https://discourse.julialang.org/t/question-distributions-jl-with-cuda/47707)

<div class="topic-metadata">

**Author:** [@sheevy](https://discourse.julialang.org/u/sheevy)\
**Replies:** 0\
**Last updated:** [October 3, 2020, 9:21pm UTC](https://discourse.julialang.org/t/question-distributions-jl-with-cuda/47707 "2020-10-03T21:21:07Z")

</div>

Hi, I’m writing a program which I wish could easily work both cpu and gpu, similarly to what one can achieve in Flux with cpu and gpu functions. I was under impression that different Julia packages compose well, so I ex…

---

## [Executing array of functions much slower than executing functions in series](https://discourse.julialang.org/t/executing-array-of-functions-much-slower-than-executing-functions-in-series/47674)

<div class="topic-metadata">

**Author:** [@Yamen](https://discourse.julialang.org/u/Yamen)\
**Replies:** 10\
**Last updated:** [October 3, 2020, 8:32pm UTC](https://discourse.julialang.org/t/executing-array-of-functions-much-slower-than-executing-functions-in-series/47674 "2020-10-03T20:32:14Z")

</div>

I have a very performance sensitive application that needs to activate a neural network on a per row basis for a large number of rows. Consider a network with 4 input values and 1 output value, with a few layers in betw…

---

## [Run time constraints in optimisation](https://discourse.julialang.org/t/run-time-constraints-in-optimisation/47657)

<div class="topic-metadata">

**Author:** [@JohnZ](https://discourse.julialang.org/u/JohnZ)\
**Replies:** 8\
**Last updated:** [October 3, 2020, 8:05pm UTC](https://discourse.julialang.org/t/run-time-constraints-in-optimisation/47657 "2020-10-03T20:05:08Z")

</div>

In an optimisation problem, I have some variables which must take same values. A simple example is given below where the optimisation variables with a unique identifier should have same values: using DataFrames using Ju…

---

## [How to get the variable numbers for a julia function](https://discourse.julialang.org/t/how-to-get-the-variable-numbers-for-a-julia-function/36682)

<div class="topic-metadata">

**Author:** [@gangchern](https://discourse.julialang.org/u/gangchern)\
**Replies:** 21\
**Last updated:** [October 3, 2020, 6:36pm UTC](https://discourse.julialang.org/t/how-to-get-the-variable-numbers-for-a-julia-function/36682 "2020-10-03T18:36:53Z")

</div>

I have a function called f for example. function f(x1,x2,x3) x1+x2\*x3 end How can get the number of variable of this function? For this example it should return 3.

---

## [Instability with DifferentialEquations.jl](https://discourse.julialang.org/t/instability-with-differentialequations-jl/7874)

<div class="topic-metadata">

**Author:** [@newbie](https://discourse.julialang.org/u/newbie)\
**Replies:** 4\
**Last updated:** [October 3, 2020, 6:25pm UTC](https://discourse.julialang.org/t/instability-with-differentialequations-jl/7874 "2020-10-03T18:25:04Z")

</div>

I am trying to solve a second order ODE equation by using SecondOrderODEProblem as problem type. Consistently, I have encountered WARNING: Instability detected. Aborting. I have tried various solver and still, the probl…

---

## [Too small legend box?](https://discourse.julialang.org/t/too-small-legend-box/47700)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 0\
**Last updated:** [October 3, 2020, 5:28pm UTC](https://discourse.julialang.org/t/too-small-legend-box/47700 "2020-10-03T17:28:55Z")

</div>

Hello! I have never tried this issue before: Why doesn’t it generate a suitable box around the labels? Using Plots in Julia 1.5 Kind regards

---

## [Turing type error: expected Float64, got ForwardDiff.Dual](https://discourse.julialang.org/t/turing-type-error-expected-float64-got-forwarddiff-dual/47670)

<div class="topic-metadata">

**Author:** [@mangulo](https://discourse.julialang.org/u/mangulo)\
**Replies:** 9\
**Last updated:** [October 3, 2020, 5:14pm UTC](https://discourse.julialang.org/t/turing-type-error-expected-float64-got-forwarddiff-dual/47670 "2020-10-03T17:14:26Z")

</div>

Hi All, I’m trying to do a multivariable linear regression y = \\Phi(A, x) using Turing, where y \\in \\mathbb R^N, x \\in \\mathbb R^N, and the function \\Phi is linear in the unknown parameters A \\in \\mathbb R^{N \\times N}.…

---

## [Plots.jl how to create a heat map from several curves](https://discourse.julialang.org/t/plots-jl-how-to-create-a-heat-map-from-several-curves/47683)

<div class="topic-metadata">

**Author:** [@a\_garval](https://discourse.julialang.org/u/a_garval)\
**Replies:** 6\
**Last updated:** [October 3, 2020, 4:56pm UTC](https://discourse.julialang.org/t/plots-jl-how-to-create-a-heat-map-from-several-curves/47683 "2020-10-03T16:56:33Z")

</div>

So I have about 100 different curves and I’d like to create a heatmap from them. These curves each represent possible solutions to a differential equation and I’d like to create a sort of density plot from them so that i…

---

## [Optim.jl --- Do all Methods Allow Box Constraints? Should all Work Without Them?](https://discourse.julialang.org/t/optim-jl-do-all-methods-allow-box-constraints-should-all-work-without-them/10209)

<div class="topic-metadata">

**Author:** [@iwelch](https://discourse.julialang.org/u/iwelch)\
**Replies:** 35\
**Last updated:** [October 3, 2020, 3:28pm UTC](https://discourse.julialang.org/t/optim-jl-do-all-methods-allow-box-constraints-should-all-work-without-them/10209 "2020-10-03T15:28:35Z")

</div>

I have been experimenting with Optim.jl. Do all optimizers offer box constraints? NOTE: All optimizers I tried can work without box constraints, except the brand new SAMIN. This example failed to use them: juli…

---

## [Move REPL pane to the right](https://discourse.julialang.org/t/move-repl-pane-to-the-right/45372)

<div class="topic-metadata">

**Author:** [@dfdx](https://discourse.julialang.org/u/dfdx)\
**Replies:** 2\
**Last updated:** [October 3, 2020, 2:38pm UTC](https://discourse.julialang.org/t/move-repl-pane-to-the-right/45372 "2020-10-03T14:38:48Z")

</div>

Perhaps a basic question, but being new to both - Atom and Juno - I can’t find the right search query. With Emacs, I used to the following window layout: Note that text editor window is on the left, and REPL is on t…

---

## [Release next version of registered packages](https://discourse.julialang.org/t/release-next-version-of-registered-packages/47690)

<div class="topic-metadata">

**Author:** [@iHany](https://discourse.julialang.org/u/iHany)\
**Replies:** 5\
**Last updated:** [October 3, 2020, 12:47pm UTC](https://discourse.julialang.org/t/release-next-version-of-registered-packages/47690 "2020-10-03T12:47:35Z")

</div>

I recently registered a package via Registrator.jl. However, I don’t know how to update and control the version of releases. I’d like to update version (e.g., v0.2.2 for the newest commit), but it looks v0.1.0 in Gener…

---

## [Calling for people using multithreading heavily, memory fragmentation problem](https://discourse.julialang.org/t/calling-for-people-using-multithreading-heavily-memory-fragmentation-problem/47687)

<div class="topic-metadata">

**Author:** [@Patrick\_Chow](https://discourse.julialang.org/u/Patrick_Chow)\
**Replies:** 1\
**Last updated:** [October 3, 2020, 12:35pm UTC](https://discourse.julialang.org/t/calling-for-people-using-multithreading-heavily-memory-fragmentation-problem/47687 "2020-10-03T12:35:37Z")

</div>

Hi Guys, I use Julia for computation intensive tasks. And of coz the best way is to reduce my run time is to use multithreading and parallelize all my work. Sometimes, my works will require larger per thread memory and…

---

## [TimesTables.jl, a fun (😰) app using QML.jl and PackageCompiler.jl](https://discourse.julialang.org/t/timestables-jl-a-fun-app-using-qml-jl-and-packagecompiler-jl/46799)

<div class="topic-metadata">

**Author:** [@barche](https://discourse.julialang.org/u/barche)\
**Replies:** 2\
**Last updated:** [October 3, 2020, 12:32pm UTC](https://discourse.julialang.org/t/timestables-jl-a-fun-app-using-qml-jl-and-packagecompiler-jl/46799 "2020-10-03T12:32:29Z")

</div>

Hi all, Following the excellent demo of PackageCompiler at JuliaCon, I decided to give it a try for a GUI application using QML. You can find the result at https://github.com/barche/TimesTables.jl The application itsel…

---

## [Macro to create a function with a variable number of elseif branches](https://discourse.julialang.org/t/macro-to-create-a-function-with-a-variable-number-of-elseif-branches/47665)

<div class="topic-metadata">

**Author:** [@disberd](https://discourse.julialang.org/u/disberd)\
**Replies:** 10\
**Last updated:** [October 3, 2020, 12:31pm UTC](https://discourse.julialang.org/t/macro-to-create-a-function-with-a-variable-number-of-elseif-branches/47665 "2020-10-03T12:31:57Z")

</div>

Hello, I am starting to try and use/understand meta-programming and wanted to create a macro to overload the getproperty function for custom types that are custom implementation of the Point in GeometryBasics (subtypes …

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

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