# Latest

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

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

**Page:** 1698

---

## [Problem using GLM](https://discourse.julialang.org/t/problem-using-glm/42576)

<div class="topic-metadata">

**Author:** [@Nash](https://discourse.julialang.org/u/Nash)\
**Replies:** 6\
**Last updated:** [July 6, 2020, 9:59am UTC](https://discourse.julialang.org/t/problem-using-glm/42576 "2020-07-06T09:59:38Z")

</div>

The following is throwing an error: using DataFrames, GLM data = DataFrame(X=1:1:length(event\[1\]), Y=event\[1\]) ols = lm(@formula(Y ~ X), data) The reason appears to be to do with the type of data I define as X and Y: t…

---

## [Problem with shell in Windows](https://discourse.julialang.org/t/problem-with-shell-in-windows/42540)

<div class="topic-metadata">

**Author:** [@Isaiah](https://discourse.julialang.org/u/Isaiah)\
**Replies:** 4\
**Last updated:** [July 6, 2020, 9:34am UTC](https://discourse.julialang.org/t/problem-with-shell-in-windows/42540 "2020-07-06T09:34:58Z")

</div>

Hi, Julia newbie here. In https://github.com/JuliaAcademy/DataScience, there are the lines: using BenchmarkTools using DataFrames using DelimitedFiles using CSV using XLSX println("I'm excited to learn Julia") P …

---

## [Macro to sum over short loop](https://discourse.julialang.org/t/macro-to-sum-over-short-loop/42574)

<div class="topic-metadata">

**Author:** [@weymouth](https://discourse.julialang.org/u/weymouth)\
**Replies:** 9\
**Last updated:** [July 6, 2020, 9:23am UTC](https://discourse.julialang.org/t/macro-to-sum-over-short-loop/42574 "2020-07-06T09:23:23Z")

</div>

I find myself writing code like this repeatedly function ke(I::CartesianIndex{d},u::Array{Float64}) where d s = 0. for i in 1:d s+=u\[I,i\]^2 end return 0.5s end and wanted to give Julia’s macros a try.…

---

## [Specify jumps in a Heston-like model?](https://discourse.julialang.org/t/specify-jumps-in-a-heston-like-model/42422)

<div class="topic-metadata">

**Author:** [@mcreel](https://discourse.julialang.org/u/mcreel)\
**Replies:** 9\
**Last updated:** [July 6, 2020, 8:35am UTC](https://discourse.julialang.org/t/specify-jumps-in-a-heston-like-model/42422 "2020-07-06T08:35:09Z")

</div>

I am working with a model similar to the Heston model, and would like to add jumps. I would like to have the jump rate which depend on the ordinary volatility as rate1(u,p,t) = λ0 .+ λ1.\*exp(u\[2\]/2.0) I understand tha…

---

## [Copying files within a a package folder](https://discourse.julialang.org/t/copying-files-within-a-a-package-folder/42593)

<div class="topic-metadata">

**Author:** [@Azzaare](https://discourse.julialang.org/u/Azzaare)\
**Replies:** 1\
**Last updated:** [July 6, 2020, 7:47am UTC](https://discourse.julialang.org/t/copying-files-within-a-a-package-folder/42593 "2020-07-06T07:47:54Z")

</div>

Hello there, Within a package that I am developing now, I have a folder of assets that I would like to copy to the working directory of the user. Is there a way to access the path of a specific package (in used in the …

---

## [Should I use @inbounds on for loop iterating through the values of a Dict?](https://discourse.julialang.org/t/should-i-use-inbounds-on-for-loop-iterating-through-the-values-of-a-dict/42570)

<div class="topic-metadata">

**Author:** [@jchen975](https://discourse.julialang.org/u/jchen975)\
**Replies:** 3\
**Last updated:** [July 6, 2020, 6:03am UTC](https://discourse.julialang.org/t/should-i-use-inbounds-on-for-loop-iterating-through-the-values-of-a-dict/42570 "2020-07-06T06:03:26Z")

</div>

Hello, I’m wondering if it’s appropriate (and necessary) to use @inbounds on a for loop that iterates through the keys/values of a Dict. After a quick search the examples where @inbounds helps are where I’m indexing an A…

---

## [Random Tuple](https://discourse.julialang.org/t/random-tuple/30623)

<div class="topic-metadata">

**Author:** [@martingalemeasure](https://discourse.julialang.org/u/martingalemeasure)\
**Replies:** 8\
**Last updated:** [July 6, 2020, 3:32am UTC](https://discourse.julialang.org/t/random-tuple/30623 "2020-07-06T03:32:16Z")

</div>

How do I create a random Tuple in Julia 1.2. In the docs it says " Support for S as a tuple requires at least Julia 1.1." but when I try rand(Tuple{Int64, Int64}) I get the error “Sampler for this object is not defin…

---

## [StratifiedKfold](https://discourse.julialang.org/t/stratifiedkfold/17957)

<div class="topic-metadata">

**Author:** [@lvoltz](https://discourse.julialang.org/u/lvoltz)\
**Replies:** 7\
**Last updated:** [July 6, 2020, 2:50am UTC](https://discourse.julialang.org/t/stratifiedkfold/17957 "2020-07-06T02:50:55Z")

</div>

Hello, I am new in Julia and I am trying to figure out how to use StratifiedKfold. I am using Julia 0.6 and just Kfold now like: Xdata=readdlm(“data.txt”) Ytarget=readdlm(“taget.txt”) folds = kfolds((Xdata,Ytarget),k=…

---

## [Scenes, parent scenes in Makie](https://discourse.julialang.org/t/scenes-parent-scenes-in-makie/42588)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 0\
**Last updated:** [July 6, 2020, 2:16am UTC](https://discourse.julialang.org/t/scenes-parent-scenes-in-makie/42588 "2020-07-06T02:16:13Z")

</div>

First, what is the best place to get fast feedback on Makie? I created a master scene and a subscene as parent\_scene = Scene() child\_scene = Scene(parent\_scene, show\_axis=false) If find that the child\_scene is transla…

---

## [Refer to a function in enclosing module](https://discourse.julialang.org/t/refer-to-a-function-in-enclosing-module/42580)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 2\
**Last updated:** [July 6, 2020, 12:02am UTC](https://discourse.julialang.org/t/refer-to-a-function-in-enclosing-module/42580 "2020-07-06T00:02:24Z")

</div>

This stumps me at the moment: How do I refer to f in the submodule? module A f(x) = 10\*x module SubA g(x) = f(1) end end using .A @show A.SubA.g(3)

---

## [Equivalent of CPAN](https://discourse.julialang.org/t/equivalent-of-cpan/42579)

<div class="topic-metadata">

**Author:** [@philiprbrenan](https://discourse.julialang.org/u/philiprbrenan)\
**Replies:** 1\
**Last updated:** [July 5, 2020, 10:58pm UTC](https://discourse.julialang.org/t/equivalent-of-cpan/42579 "2020-07-05T22:58:43Z")

</div>

Is there a Julia equivalent of the Perl CPAN?

---

## [Package of utility scripting?](https://discourse.julialang.org/t/package-of-utility-scripting/42542)

<div class="topic-metadata">

**Author:** [@nstgc](https://discourse.julialang.org/u/nstgc)\
**Replies:** 6\
**Last updated:** [July 5, 2020, 8:24pm UTC](https://discourse.julialang.org/t/package-of-utility-scripting/42542 "2020-07-05T20:24:16Z")

</div>

I have some rather hefty bash scripts (several in the 200+ lines range) which I would like to transcode to Julia. I’ve tried this in the past with what could generously be called “limited success”. Now that I have the pa…

---

## [Makie, Mesh, turning axis visibility](https://discourse.julialang.org/t/makie-mesh-turning-axis-visibility/42551)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 6\
**Last updated:** [July 5, 2020, 4:53pm UTC](https://discourse.julialang.org/t/makie-mesh-turning-axis-visibility/42551 "2020-07-05T16:53:34Z")

</div>

I have two objects displayed in two scenes within Makie. A box with axes appears up for each object. How do I turn these off? I include an image that shows the two sets of axes. I realize that I could create a single sc…

---

## [How to parameterize an argument which is either Int64,Int32, etc](https://discourse.julialang.org/t/how-to-parameterize-an-argument-which-is-either-int64-int32-etc/42564)

<div class="topic-metadata">

**Author:** [@mkarikom](https://discourse.julialang.org/u/mkarikom)\
**Replies:** 3\
**Last updated:** [July 5, 2020, 5:38pm UTC](https://discourse.julialang.org/t/how-to-parameterize-an-argument-which-is-either-int64-int32-etc/42564 "2020-07-05T17:38:21Z")

</div>

I tried this and it stubbornly refuses to accept anything but Int64: function testint(num::Int) print(num) end check = Int8(4) testint(check) ERROR: MethodError: no method matching testint(::Int8) Closest candidat…

---

## [Multidimensional interpolation](https://discourse.julialang.org/t/multidimensional-interpolation/42563)

<div class="topic-metadata">

**Author:** [@IgnacioSuarez](https://discourse.julialang.org/u/IgnacioSuarez)\
**Replies:** 0\
**Last updated:** [July 5, 2020, 4:54pm UTC](https://discourse.julialang.org/t/multidimensional-interpolation/42563 "2020-07-05T16:54:56Z")

</div>

Hi! I would like to fit a dipole moment surface for tri- and tetra-atomic molecules. That means that the dipole moment depends on 3 variables for the first case and on 6 variables for the tetra-atomic case. For that pu…

---

## [Kronecker times vector with special structure](https://discourse.julialang.org/t/kronecker-times-vector-with-special-structure/42477)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 10\
**Last updated:** [July 5, 2020, 4:39pm UTC](https://discourse.julialang.org/t/kronecker-times-vector-with-special-structure/42477 "2020-07-05T16:39:11Z")

</div>

I would like to evaluate (I\_1 \\otimes a\_2^\\top \\otimes I\_3) \\cdot \\theta where I\_1 and I\_3 are identity matrices with size n \\times n and m \\times m, a\_2 is a vector of length k, \\theta is a vector of length mnk. …

---

## [Simple way to save several variables](https://discourse.julialang.org/t/simple-way-to-save-several-variables/42549)

<div class="topic-metadata">

**Author:** [@compleat](https://discourse.julialang.org/u/compleat)\
**Replies:** 10\
**Last updated:** [July 5, 2020, 2:24pm UTC](https://discourse.julialang.org/t/simple-way-to-save-several-variables/42549 "2020-07-05T14:24:19Z")

</div>

Although I have been using Julia for over a year now, I still have problems with basic things, so I consider myself to be a ‘newbie’, so please be gentle. I would like a simple way for me (and my students) to be able to…

---

## [How to color surfaces of Shape objects according to categorical values?](https://discourse.julialang.org/t/how-to-color-surfaces-of-shape-objects-according-to-categorical-values/42556)

<div class="topic-metadata">

**Author:** [@gedankenexperiment](https://discourse.julialang.org/u/gedankenexperiment)\
**Replies:** 0\
**Last updated:** [July 5, 2020, 2:20pm UTC](https://discourse.julialang.org/t/how-to-color-surfaces-of-shape-objects-according-to-categorical-values/42556 "2020-07-05T14:20:27Z")

</div>

I’m using fill\_z to color surfaces inside Shape() objects. I have a column that has categorical data. But fill\_z only accepts type float. I mean I can have an additional column with float values, but if I for example on…

---

## [How to plot 2D polygons / shapes in Julia and color surfaces?](https://discourse.julialang.org/t/how-to-plot-2d-polygons-shapes-in-julia-and-color-surfaces/42552)

<div class="topic-metadata">

**Author:** [@gedankenexperiment](https://discourse.julialang.org/u/gedankenexperiment)\
**Replies:** 1\
**Last updated:** [July 5, 2020, 1:51pm UTC](https://discourse.julialang.org/t/how-to-plot-2d-polygons-shapes-in-julia-and-color-surfaces/42552 "2020-07-05T13:51:47Z")

</div>

I have a dataframe that contains the spatial coordinates of polygons as columns x,y, their ID as a column and another column according tho whose values I would like to color the surfaces. Do you have suggestions on how t…

---

## [How to extend cube root to complex numbers?](https://discourse.julialang.org/t/how-to-extend-cube-root-to-complex-numbers/42509)

<div class="topic-metadata">

**Author:** [@StevenSiew](https://discourse.julialang.org/u/StevenSiew)\
**Replies:** 7\
**Last updated:** [July 5, 2020, 11:55am UTC](https://discourse.julialang.org/t/how-to-extend-cube-root-to-complex-numbers/42509 "2020-07-05T11:55:14Z")

</div>

I can find square root of complex numbers but not cube root julia\> sqrt(1 + 2im) 1.272019649514069 + 0.7861513777574233im julia\> cbrt(1 + 2im) ERROR: MethodError: no method matching cbrt(::Complex{Int64}) Closest candi…

---

## [Use of map](https://discourse.julialang.org/t/use-of-map/42545)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 2\
**Last updated:** [July 5, 2020, 11:18am UTC](https://discourse.julialang.org/t/use-of-map/42545 "2020-07-05T11:18:43Z")

</div>

I am using Makie with text sliders, and I would like to understand a strange behavior of map. Consider the code: using Makie sradius, s\_marker\_radius = textslider((0.5f0:0.25f0:10f0), "Radius", start=2.f0) map(s -\> sin(…

---

## [Error in building Julia for Alpine Linux (ARM v7 32bits)](https://discourse.julialang.org/t/error-in-building-julia-for-alpine-linux-arm-v7-32bits/42225)

<div class="topic-metadata">

**Author:** [@RGerzaguet](https://discourse.julialang.org/u/RGerzaguet)\
**Replies:** 3\
**Last updated:** [July 5, 2020, 9:52am UTC](https://discourse.julialang.org/t/error-in-building-julia-for-alpine-linux-arm-v7-32bits/42225 "2020-07-05T09:52:06Z")

</div>

Hello folks I try to built Julia for a custom Alpine linux armv7 on Docker. The container I use is this one (https://github.com/balena-io-library/base-images/tree/master/balena-base-images/device-base/zc702-zynq7/alpine…

---

## [Function generating functions](https://discourse.julialang.org/t/function-generating-functions/42450)

<div class="topic-metadata">

**Author:** [@yfw](https://discourse.julialang.org/u/yfw)\
**Replies:** 5\
**Last updated:** [July 5, 2020, 9:31am UTC](https://discourse.julialang.org/t/function-generating-functions/42450 "2020-07-05T09:31:22Z")

</div>

Hello together, Maybe this question is kind of trivial, but since I’m a Julia newbie I hoped to find some help and/or advice here. :wink: I would like to fit different functions to some data. They only differ by one pa…

---

## [\[ANN\]: PaddedMatrices.jl, Julia BLAS and partially sized arrays](https://discourse.julialang.org/t/ann-paddedmatrices-jl-julia-blas-and-partially-sized-arrays/38215)

<div class="topic-metadata">

**Author:** [@Elrod](https://discourse.julialang.org/u/Elrod)\
**Replies:** 32\
**Last updated:** [July 5, 2020, 4:58am UTC](https://discourse.julialang.org/t/ann-paddedmatrices-jl-julia-blas-and-partially-sized-arrays/38215 "2020-07-05T04:58:30Z")

</div>

PaddedMatrices is an experimental and not well tested. Issues/PRs/comments are all welcome. The package is registered, so you can install via \] add PaddedMatrices. More functionality is coming in the future, but the tw…

---

## [Automatic Parallelization in Julia](https://discourse.julialang.org/t/automatic-parallelization-in-julia/42543)

<div class="topic-metadata">

**Author:** [@Honza9723](https://discourse.julialang.org/u/Honza9723)\
**Replies:** 5\
**Last updated:** [July 5, 2020, 3:05am UTC](https://discourse.julialang.org/t/automatic-parallelization-in-julia/42543 "2020-07-05T03:05:08Z")

</div>

Dear All, I would like to ask you, whether there is some automatic parallelization tool in Julia similar to auto parallelization capabilities of Intel/gcc compilers for Fortran/C++. It would be really awesome if Julia c…

---

## [JuliaAcademy is now free](https://discourse.julialang.org/t/juliaacademy-is-now-free/30457)

<div class="topic-metadata">

**Author:** [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Replies:** 16\
**Last updated:** [July 5, 2020, 12:20am UTC](https://discourse.julialang.org/t/juliaacademy-is-now-free/30457 "2020-07-05T00:20:22Z")

</div>

We have exciting news: Julia Academy is now entirely free! Perhaps even better, we’ve simultaneously open-sourced the raw materials we used to generate the courses. Julia Academy bundles interactive notebooks with inst…

---

## [Time needed to perform a complete loop](https://discourse.julialang.org/t/time-needed-to-perform-a-complete-loop/42494)

<div class="topic-metadata">

**Author:** [@sergevic](https://discourse.julialang.org/u/sergevic)\
**Replies:** 10\
**Last updated:** [July 4, 2020, 11:56pm UTC](https://discourse.julialang.org/t/time-needed-to-perform-a-complete-loop/42494 "2020-07-04T23:56:06Z")

</div>

I want to measure the total amount of time nedded to perform a complete loop. I tried @time for i in 1:10000 ... ... end and it returned .988083 seconds (57.58 M allocations: 39.867 GiB, 0.14% gc time) when the code ra…

---

## [What is a Makie Object](https://discourse.julialang.org/t/what-is-a-makie-object/42539)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 0\
**Last updated:** [July 4, 2020, 10:25pm UTC](https://discourse.julialang.org/t/what-is-a-makie-object/42539 "2020-07-04T22:25:22Z")

</div>

I am trying to control the radius of a HyperSphere using Makie textsliders and have been unsuccessful. So I figured I would use scale! to scale an object. But I have not seen any definition of a Makie Object. I thought t…

---

## [Error with using distributions package](https://discourse.julialang.org/t/error-with-using-distributions-package/39436)

<div class="topic-metadata">

**Author:** [@soo\_y](https://discourse.julialang.org/u/soo_y)\
**Replies:** 12\
**Last updated:** [July 4, 2020, 9:55pm UTC](https://discourse.julialang.org/t/error-with-using-distributions-package/39436 "2020-07-04T21:55:26Z")

</div>

HI I am trying to use distribution package and I have an error as below I am using window10 64bit, 4gRam. \[ Info: Precompiling Distributions \[31c24e10-a181-5473-b8eb-7969acd0382f\] Cannot open cache file "C:\\Users\\?�승…

---

## [SymEngine Not Calculating Function Correctly](https://discourse.julialang.org/t/symengine-not-calculating-function-correctly/42532)

<div class="topic-metadata">

**Author:** [@vf30kf](https://discourse.julialang.org/u/vf30kf)\
**Replies:** 8\
**Last updated:** [July 4, 2020, 9:26pm UTC](https://discourse.julialang.org/t/symengine-not-calculating-function-correctly/42532 "2020-07-04T21:26:28Z")

</div>

See the code from the REPL below. What gives? julia\> using SymEngine julia\> @vars x1, x2, x3 (x1, x2, x3) julia\> f = sin(x1\*x2) + exp(x2 + x3) - x3 -x3 + exp(x2 + x3) + sin(x2\*x1) julia\> gf\_x1 = diff(f,x1) x2\*cos(x2…

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

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