# Latest

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

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

**Page:** 782

---

## [LIBSVM.jl with imbalanced dataset](https://discourse.julialang.org/t/libsvm-jl-with-imbalanced-dataset/94635)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 0\
**Last updated:** [February 14, 2023, 4:36pm UTC](https://discourse.julialang.org/t/libsvm-jl-with-imbalanced-dataset/94635 "2023-02-14T16:36:47Z")

</div>

I am trying to use LIBSVM.jl with an imbalanced dataset. Providing weights for each class doesn’t seem to affect the result: using CSV using DataFrames using LIBSVM df = CSV.read("svm.csv", DataFrame) X = \[df.x1 df.x…

---

## [Creating a struct from a Named Tuple](https://discourse.julialang.org/t/creating-a-struct-from-a-named-tuple/94586)

<div class="topic-metadata">

**Author:** [@alfaromartino](https://discourse.julialang.org/u/alfaromartino)\
**Replies:** 7\
**Last updated:** [February 14, 2023, 2:15pm UTC](https://discourse.julialang.org/t/creating-a-struct-from-a-named-tuple/94586 "2023-02-14T14:15:36Z")

</div>

Is there any function like similar which creates a struct inhering the names and types of a NamedTuple? MEW: nt = (a = 1, b ="Hello") #some function like MyStruct = similar(nt) #\`similar\` would create this: struct M…

---

## [Error when using sparse Jacobians/Krylov solvers in RadauIIA methods](https://discourse.julialang.org/t/error-when-using-sparse-jacobians-krylov-solvers-in-radauiia-methods/94629)

<div class="topic-metadata">

**Author:** [@wpowell96](https://discourse.julialang.org/u/wpowell96)\
**Replies:** 2\
**Last updated:** [February 14, 2023, 4:20pm UTC](https://discourse.julialang.org/t/error-when-using-sparse-jacobians-krylov-solvers-in-radauiia-methods/94629 "2023-02-14T16:20:24Z")

</div>

Yesterday I posted an issue but realized that I forgot to crosspost this here for visibility. I was trying to generate some work-precision diagrams for MOL PDEs based on this old SciML benchmark. The syntax for declarin…

---

## [Empirical distribution type for continuous variables](https://discourse.julialang.org/t/empirical-distribution-type-for-continuous-variables/5676)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 18\
**Last updated:** [February 14, 2023, 2:48pm UTC](https://discourse.julialang.org/t/empirical-distribution-type-for-continuous-variables/5676 "2023-02-14T14:48:24Z")

</div>

Is there a functionality somewhere in StatsBase.jl or Distributions.jl for computing statistics from an empirical distribution type? Specifically, suppose I have samples in the real line, and that I want to compute the q…

---

## [Modelling problem with JuMP](https://discourse.julialang.org/t/modelling-problem-with-jump/94520)

<div class="topic-metadata">

**Author:** [@Karajan](https://discourse.julialang.org/u/Karajan)\
**Replies:** 2\
**Last updated:** [February 14, 2023, 2:47pm UTC](https://discourse.julialang.org/t/modelling-problem-with-jump/94520 "2023-02-14T14:47:12Z")

</div>

Hi there! I have the following problem: I have n \>= 8 people who are supposed to do a “shift” (this is not for a job but for a hobby. I would hope HR people know how to properly do this :grin:). There is one shift each …

---

## [List of use´d or import'ed modules in a Julia session](https://discourse.julialang.org/t/list-of-use-d-or-imported-modules-in-a-julia-session/94584)

<div class="topic-metadata">

**Author:** [@mocalvao](https://discourse.julialang.org/u/mocalvao)\
**Replies:** 9\
**Last updated:** [February 14, 2023, 2:18pm UTC](https://discourse.julialang.org/t/list-of-use-d-or-imported-modules-in-a-julia-session/94584 "2023-02-14T14:18:33Z")

</div>

Hi there I would like to understand a little bit more about the answer to the question implied on the title of this topic of mine, as per the following question from StackOverflow: List of loaded/imported packages in Ju…

---

## [Single click julia project creation with vscode?](https://discourse.julialang.org/t/single-click-julia-project-creation-with-vscode/94611)

<div class="topic-metadata">

**Author:** [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Replies:** 4\
**Last updated:** [February 14, 2023, 1:49pm UTC](https://discourse.julialang.org/t/single-click-julia-project-creation-with-vscode/94611 "2023-02-14T13:49:07Z")

</div>

Hi, With other languages, most IDEs provide tools/buttons to create well structured projects. In julia, I use PkgSkeleton.jl or PkgTemplates.jl to create project, but I think that this process could be more accessible …

---

## [Probability queries for simple model](https://discourse.julialang.org/t/probability-queries-for-simple-model/93661)

<div class="topic-metadata">

**Author:** [@goretkin](https://discourse.julialang.org/u/goretkin)\
**Replies:** 5\
**Last updated:** [February 14, 2023, 1:35pm UTC](https://discourse.julialang.org/t/probability-queries-for-simple-model/93661 "2023-02-14T13:35:38Z")

</div>

I’d like both of the queries below to return 0.5. using Turing @model function foo(w) w ~ Categorical(\[0.5, 0.5\]) x = w + 1 end model = foo(missing) println(prob"w = 2 | model = model") println(prob"x = 3 | m…

---

## [Avoid unnecesary Statistics import](https://discourse.julialang.org/t/avoid-unnecesary-statistics-import/59495)

<div class="topic-metadata">

**Author:** [@nandoconde](https://discourse.julialang.org/u/nandoconde)\
**Replies:** 5\
**Last updated:** [February 14, 2023, 12:54pm UTC](https://discourse.julialang.org/t/avoid-unnecesary-statistics-import/59495 "2023-02-14T12:54:14Z")

</div>

Hello! I am using a function from the integrated stdlib Statistics in my package. Do I have to check Statistics as a dependency explicitly? Shouldn’t it always be present because it is shipped with Julia? The message I…

---

## [Struggling to train a UDE model with a GPU](https://discourse.julialang.org/t/struggling-to-train-a-ude-model-with-a-gpu/94565)

<div class="topic-metadata">

**Author:** [@JuliaQ123](https://discourse.julialang.org/u/JuliaQ123)\
**Replies:** 3\
**Last updated:** [February 14, 2023, 12:33pm UTC](https://discourse.julialang.org/t/struggling-to-train-a-ude-model-with-a-gpu/94565 "2023-02-14T12:33:09Z")

</div>

Hi I have been trying to implement a UDE model and train it using a GPU, following the Neural ODE docs closely. However when I run the code I get an extremely long error and I cannot figure out how to go about solving i…

---

## [3D Polar surface plot in Julia](https://discourse.julialang.org/t/3d-polar-surface-plot-in-julia/94537)

<div class="topic-metadata">

**Author:** [@yewalenikhil65](https://discourse.julialang.org/u/yewalenikhil65)\
**Replies:** 9\
**Last updated:** [February 14, 2023, 12:00pm UTC](https://discourse.julialang.org/t/3d-polar-surface-plot-in-julia/94537 "2023-02-14T12:00:13Z")

</div>

I feel there is a need of 3D Polar surface plots. Does any one have Julia equivalent of following MATLAB function ? 3D Polar Plot - File Exchange - MATLAB Central

---

## [How to ask in source for a backtrace](https://discourse.julialang.org/t/how-to-ask-in-source-for-a-backtrace/94616)

<div class="topic-metadata">

**Author:** [@pao](https://discourse.julialang.org/u/pao)\
**Replies:** 2\
**Last updated:** [February 14, 2023, 11:15am UTC](https://discourse.julialang.org/t/how-to-ask-in-source-for-a-backtrace/94616 "2023-02-14T11:15:02Z")

</div>

Is there any macro or function to get a local becktrace, i.e., the stack of calls porting the execution there at run-ime? Thanks for help.

---

## [Function Composition Strategies](https://discourse.julialang.org/t/function-composition-strategies/94571)

<div class="topic-metadata">

**Author:** [@mrufsvold](https://discourse.julialang.org/u/mrufsvold)\
**Replies:** 5\
**Last updated:** [February 14, 2023, 11:02am UTC](https://discourse.julialang.org/t/function-composition-strategies/94571 "2023-02-14T11:02:05Z")

</div>

In my project ExpandNestedData.jl, I need to compose a series of Iterator functions that are unique for any given input. I was using Iterators.repeat, Iterators.flatten, etc. but since each of these returns a parametrize…

---

## [How to define trainable weights in Flux](https://discourse.julialang.org/t/how-to-define-trainable-weights-in-flux/94617)

<div class="topic-metadata">

**Author:** [@Xuekui\_wang](https://discourse.julialang.org/u/Xuekui_wang)\
**Replies:** 0\
**Last updated:** [February 14, 2023, 10:39am UTC](https://discourse.julialang.org/t/how-to-define-trainable-weights-in-flux/94617 "2023-02-14T10:39:29Z")

</div>

I want to define a network mode with W=\[w11 0 w13; 0 w22 0; w31 0 w33\], i.e. set some weights to fixed number and they are not trained, for example m3 = Chain(Dense(3,3), Dense(3,2)) how to set m3.layer\[1\].weights, a…

---

## [Consecutive findmin and findmax](https://discourse.julialang.org/t/consecutive-findmin-and-findmax/94419)

<div class="topic-metadata">

**Author:** [@filchristou](https://discourse.julialang.org/u/filchristou)\
**Replies:** 6\
**Last updated:** [February 14, 2023, 8:12am UTC](https://discourse.julialang.org/t/consecutive-findmin-and-findmax/94419 "2023-02-14T08:12:13Z")

</div>

I want to find the index of an element after consecutive min and max operations. I have a working code, but it’s ugly and probably inefficient since it makes unneeded iterations. Also it’s not flexible, in the sense it…

---

## [Fill area under 3d curve PlotlyJS.jl](https://discourse.julialang.org/t/fill-area-under-3d-curve-plotlyjs-jl/94556)

<div class="topic-metadata">

**Author:** [@Maucejo](https://discourse.julialang.org/u/Maucejo)\
**Replies:** 2\
**Last updated:** [February 14, 2023, 5:44am UTC](https://discourse.julialang.org/t/fill-area-under-3d-curve-plotlyjs-jl/94556 "2023-02-14T05:44:03Z")

</div>

Dear all, I struggle with a problem for a few days. Indeed, I am trying to fill the area under a 3d curve using PlotlyJS without any success. Here is the MWE: using PlotlyJS x = range(0., 2π, 100) z = sin.(x) X = \[0…

---

## [\`solve(prob,Optim.BFGS())\` requires \`using OptimizationOptimJL](https://discourse.julialang.org/t/solve-prob-optim-bfgs-requires-using-optimizationoptimjl/94544)

<div class="topic-metadata">

**Author:** [@qjulia](https://discourse.julialang.org/u/qjulia)\
**Replies:** 2\
**Last updated:** [February 14, 2023, 4:58am UTC](https://discourse.julialang.org/t/solve-prob-optim-bfgs-requires-using-optimizationoptimjl/94544 "2023-02-14T04:58:17Z")

</div>

Hello, I am using the following two lines and OptimizationOptimJL is installed. using OptimizationOptimJL; optimized\_sol\_nn2 = Optimization.solve(optprob, optimized\_sol\_nn.minimizer, Optim.BFGS(initial\_stepnorm=0.001),…

---

## [Uplift model similar to PyLift or R's Lift Package?](https://discourse.julialang.org/t/uplift-model-similar-to-pylift-or-rs-lift-package/94268)

<div class="topic-metadata">

**Author:** [@Billpete002](https://discourse.julialang.org/u/Billpete002)\
**Replies:** 1\
**Last updated:** [February 14, 2023, 4:36am UTC](https://discourse.julialang.org/t/uplift-model-similar-to-pylift-or-rs-lift-package/94268 "2023-02-14T04:36:53Z")

</div>

Hi, I am looking for a package that works similarly to PyLift or R’s lift package. The idea is that I have two models: Self-service and the other is Sales-Assisted. I used Catboost.jl and examined manually that leads go…

---

## [Error in Fitting a Straight Line Tutorial](https://discourse.julialang.org/t/error-in-fitting-a-straight-line-tutorial/94591)

<div class="topic-metadata">

**Author:** [@gekkoe](https://discourse.julialang.org/u/gekkoe)\
**Replies:** 1\
**Last updated:** [February 14, 2023, 3:45am UTC](https://discourse.julialang.org/t/error-in-fitting-a-straight-line-tutorial/94591 "2023-02-14T03:45:03Z")

</div>

I apologize if this has been covered before. I did some searching but didn’t find another mention of it. I’ve been trying to work through the Fitting a Straight Line tutorial on the fluxml.ai site and keep running into …

---

## [New to Julia and Formatting StructArrays for GPU use with mutable scalars](https://discourse.julialang.org/t/new-to-julia-and-formatting-structarrays-for-gpu-use-with-mutable-scalars/94243)

<div class="topic-metadata">

**Author:** [@David\_A](https://discourse.julialang.org/u/David_A)\
**Replies:** 2\
**Last updated:** [February 13, 2023, 11:30pm UTC](https://discourse.julialang.org/t/new-to-julia-and-formatting-structarrays-for-gpu-use-with-mutable-scalars/94243 "2023-02-13T23:30:46Z")

</div>

First, I apologize if the long rambling post is not in keeping with expectations here and would like to preemptively thank anyone with the patience to read part or all of this and provide any feedback/guidance. Backgrou…

---

## [Using types to enumerate](https://discourse.julialang.org/t/using-types-to-enumerate/94575)

<div class="topic-metadata">

**Author:** [@smartalecH](https://discourse.julialang.org/u/smartalecH)\
**Replies:** 5\
**Last updated:** [February 13, 2023, 11:09pm UTC](https://discourse.julialang.org/t/using-types-to-enumerate/94575 "2023-02-13T23:09:21Z")

</div>

I know there’s been a few different discussions regarding the use of types themselves as enums. But I was reading through the style guide and found an interesting tidbit that goes against my intuition: If a type is eff…

---

## [How to create surface plot in CairoMakie where the sides are 'filled'?](https://discourse.julialang.org/t/how-to-create-surface-plot-in-cairomakie-where-the-sides-are-filled/94454)

<div class="topic-metadata">

**Author:** [@yhchang96](https://discourse.julialang.org/u/yhchang96)\
**Replies:** 6\
**Last updated:** [February 13, 2023, 10:12pm UTC](https://discourse.julialang.org/t/how-to-create-surface-plot-in-cairomakie-where-the-sides-are-filled/94454 "2023-02-13T22:12:36Z")

</div>

I can make a surface plot with the following codes: x = range(-1, 1, length=129) y = range(-1, 1, length=129) R = x'.^2 .+ y.^2 h2d = cos.(R) update\_theme!( lightposition = Vec3f(50, 10, 0), Axis3 = ( e…

---

## [For loop on the elements of a mutable struct](https://discourse.julialang.org/t/for-loop-on-the-elements-of-a-mutable-struct/94563)

<div class="topic-metadata">

**Author:** [@fdekerme](https://discourse.julialang.org/u/fdekerme)\
**Replies:** 9\
**Last updated:** [February 13, 2023, 8:46pm UTC](https://discourse.julialang.org/t/for-loop-on-the-elements-of-a-mutable-struct/94563 "2023-02-13T20:46:14Z")

</div>

Hi ! :smiley: I have a question about mutable structs. I have a model model composed of several compartments, each characterized by (say) 2 values a and b. I would like to make a for loop to test different values of a …

---

## [How to install a python package automatically in my package?](https://discourse.julialang.org/t/how-to-install-a-python-package-automatically-in-my-package/94581)

<div class="topic-metadata">

**Author:** [@Iddingsite](https://discourse.julialang.org/u/Iddingsite)\
**Replies:** 3\
**Last updated:** [February 13, 2023, 8:14pm UTC](https://discourse.julialang.org/t/how-to-install-a-python-package-automatically-in-my-package/94581 "2023-02-13T20:14:13Z")

</div>

Hi everyone, I am writing a small package for a personel project. It is dependant on a python package that is wrapping another code written in Fortran. I know how to install it via pip in PyCall.jl and it works great. …

---

## [Installing Julia in Windows Environment with No Internet](https://discourse.julialang.org/t/installing-julia-in-windows-environment-with-no-internet/60243)

<div class="topic-metadata">

**Author:** [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Replies:** 9\
**Last updated:** [February 13, 2023, 7:48pm UTC](https://discourse.julialang.org/t/installing-julia-in-windows-environment-with-no-internet/60243 "2023-02-13T19:48:50Z")

</div>

Hi all, I need to install Julia to a Windows environment that does not have an internet connection. I can prepare the installation outside of this environment but then need to transfer the installation to the space. I w…

---

## [Ploting LARGE heatmaps? Plots.jl in GPU?](https://discourse.julialang.org/t/ploting-large-heatmaps-plots-jl-in-gpu/94033)

<div class="topic-metadata">

**Author:** [@marianoarnaiz](https://discourse.julialang.org/u/marianoarnaiz)\
**Replies:** 12\
**Last updated:** [February 13, 2023, 7:20pm UTC](https://discourse.julialang.org/t/ploting-large-heatmaps-plots-jl-in-gpu/94033 "2023-02-13T19:20:37Z")

</div>

Hi all. I have this matrix that has a size of 3250x55650 and it is just a sample of my raw data. I have a few files much larger. I need to make heatmaps but Plots.jl is a bit slow on CPU when I run these lines p1=he…

---

## [Understanding order of operations and overflow problems](https://discourse.julialang.org/t/understanding-order-of-operations-and-overflow-problems/94580)

<div class="topic-metadata">

**Author:** [@David\_A](https://discourse.julialang.org/u/David_A)\
**Replies:** 2\
**Last updated:** [February 13, 2023, 7:11pm UTC](https://discourse.julialang.org/t/understanding-order-of-operations-and-overflow-problems/94580 "2023-02-13T19:11:59Z")

</div>

Say I have the following 4 arrays p=Float16\[262.0, 289.5, 4.71\] tb=Float16\[9.42, -3.555, -7.098\] ts=Float16\[357.5, 306.5, 294.8\] nc=UInt16\[0xf43a, 0xfff7, 0x312f\] and I then want to compute floor.(UInt16, (p.-tb)./ts.…

---

## [Change a vector CartesianIndex](https://discourse.julialang.org/t/change-a-vector-cartesianindex/94506)

<div class="topic-metadata">

**Author:** [@Zerosum](https://discourse.julialang.org/u/Zerosum)\
**Replies:** 8\
**Last updated:** [February 13, 2023, 6:53pm UTC](https://discourse.julialang.org/t/change-a-vector-cartesianindex/94506 "2023-02-13T18:53:07Z")

</div>

I was wondering if I could get help with this problem. I have a matrix and find every index where its value is negative. mat = \[1 2 3 ; -1 -2 3\] ind = findall(\<(0),mat) 2-element Vector{CartesianIndex{2}}: Cartesian…

---

## [\[ANN\] OndaBatches.jl: Continuous and distributed batching for Onda-formatted datasets](https://discourse.julialang.org/t/ann-ondabatches-jl-continuous-and-distributed-batching-for-onda-formatted-datasets/94577)

<div class="topic-metadata">

**Author:** [@dave.f.kleinschmidt](https://discourse.julialang.org/u/dave.f.kleinschmidt)\
**Replies:** 0\
**Last updated:** [February 13, 2023, 6:12pm UTC](https://discourse.julialang.org/t/ann-ondabatches-jl-continuous-and-distributed-batching-for-onda-formatted-datasets/94577 "2023-02-13T18:12:35Z")

</div>

We (Beacon Biosignals) have recently open-sourced OndaBatches.jl, which encapsulates a set of patterns we’ve found useful for our machine-learning workflows. For high-level context, we’re often working with inconvenient…

---

## [Using Split ODE Solvers within Method of Steps](https://discourse.julialang.org/t/using-split-ode-solvers-within-method-of-steps/94569)

<div class="topic-metadata">

**Author:** [@wpowell96](https://discourse.julialang.org/u/wpowell96)\
**Replies:** 2\
**Last updated:** [February 13, 2023, 5:39pm UTC](https://discourse.julialang.org/t/using-split-ode-solvers-within-method-of-steps/94569 "2023-02-13T17:39:21Z")

</div>

I am interesting in simulating delayed reaction-diffusion equations of the form u\_t = \\Delta u + f(u,u(t-\\tau)) in a 2-D spatial domain of modest size (10,000 equations) and a non-stiff nonlinearity (for now). My curre…

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

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