# New to Julia

**URL:** https://discourse.julialang.org/c/first-steps/8.md?page=36

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

**Page:** 37

---

## [StatsBase.wsum doesn't work for iterators](https://discourse.julialang.org/t/statsbase-wsum-doesnt-work-for-iterators/118289)

<div class="topic-metadata">

**Author:** [@freeman](https://discourse.julialang.org/u/freeman)\
**Replies:** 1\
**Last updated:** [August 19, 2024, 4:56pm UTC](https://discourse.julialang.org/t/statsbase-wsum-doesnt-work-for-iterators/118289 "2024-08-19T16:56:28Z")

</div>

StatsBase.wsum (and others) don’t work on iterators. Is there a fundamental reason for this? And speaking of which, the docstring shows wsum(v, w::AbstractVector, \[dim\]) but in reality all methods are v::AbstractArray. …

---

## [Type issue in for loop over items in struct field](https://discourse.julialang.org/t/type-issue-in-for-loop-over-items-in-struct-field/118268)

<div class="topic-metadata">

**Author:** [@JADekker](https://discourse.julialang.org/u/JADekker)\
**Replies:** 19\
**Last updated:** [August 19, 2024, 4:45pm UTC](https://discourse.julialang.org/t/type-issue-in-for-loop-over-items-in-struct-field/118268 "2024-08-19T16:45:50Z")

</div>

Hi, I’m encountering what I think is a type(-stability?) issue in the below MWE; is there a way in which I can resolve the problem within fun\_test? (I’d rather not change the structure of Aux, BasisOperation and AOperati…

---

## [Error in Images (FFTW.dct)](https://discourse.julialang.org/t/error-in-images-fftw-dct/118344)

<div class="topic-metadata">

**Author:** [@AbdelazimHussien](https://discourse.julialang.org/u/AbdelazimHussien)\
**Replies:** 9\
**Last updated:** [August 19, 2024, 9:14am UTC](https://discourse.julialang.org/t/error-in-images-fftw-dct/118344 "2024-08-19T09:14:16Z")

</div>

Hello I have the following code using FFTW using TestImages, ImageView, Random using Plots module Codec1 function blockdct6(img::Matrix{Float32}) y, x = size(img) outx = div(x, 8) outy = d…

---

## [Static structs with constant field](https://discourse.julialang.org/t/static-structs-with-constant-field/48009)

<div class="topic-metadata">

**Author:** [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Replies:** 6\
**Last updated:** [August 19, 2024, 8:35am UTC](https://discourse.julialang.org/t/static-structs-with-constant-field/48009 "2024-08-19T08:35:30Z")

</div>

Hey guys, It’s there a way to declare a constant struct. const struct A a = 1 b = "value" end println(A.b) Thy for your time

---

## [Memory best practices in Julia with Arrays vs Vectors](https://discourse.julialang.org/t/memory-best-practices-in-julia-with-arrays-vs-vectors/118307)

<div class="topic-metadata">

**Author:** [@ckawa](https://discourse.julialang.org/u/ckawa)\
**Replies:** 19\
**Last updated:** [August 18, 2024, 8:29am UTC](https://discourse.julialang.org/t/memory-best-practices-in-julia-with-arrays-vs-vectors/118307 "2024-08-18T08:29:40Z")

</div>

I’m transitioning from MATLAB to Julia and I’m wondering if there are any best-practices for optimizing for memory and computational time when writing simulations. Specifically, I’m designing a simple verlet integration…

---

## [How to rotate xticks in CairoMakie?](https://discourse.julialang.org/t/how-to-rotate-xticks-in-cairomakie/63120)

<div class="topic-metadata">

**Author:** [@TheRoniOne](https://discourse.julialang.org/u/TheRoniOne)\
**Replies:** 4\
**Last updated:** [August 16, 2024, 9:42pm UTC](https://discourse.julialang.org/t/how-to-rotate-xticks-in-cairomakie/63120 "2024-08-16T21:42:55Z")

</div>

Hi, I’m using CairoMakie and can’t find a way to rotate xticks 90° (from horizontal to vertical), already defined my own FIgure and Axis and trying to make a scatter plot. f = Figure() Axis(f\[1,1\], xticks = (1:31, df.…

---

## [Has anyone got a LLM to work with any Julia editor/IDE/whatever?](https://discourse.julialang.org/t/has-anyone-got-a-llm-to-work-with-any-julia-editor-ide-whatever/118275)

<div class="topic-metadata">

**Author:** [@loisel](https://discourse.julialang.org/u/loisel)\
**Replies:** 2\
**Last updated:** [August 16, 2024, 7:55pm UTC](https://discourse.julialang.org/t/has-anyone-got-a-llm-to-work-with-any-julia-editor-ide-whatever/118275 "2024-08-16T19:55:08Z")

</div>

I’ve installed ollama with DeepSeek Coder v2, and it seems to be plenty fast enough on my old Mac laptop, but I can’t figure out how to plug it into any editor. I’ve tried vscode with continue but somehow it isn’t doing …

---

## [Partial specification of parameters for composite types](https://discourse.julialang.org/t/partial-specification-of-parameters-for-composite-types/118283)

<div class="topic-metadata">

**Author:** [@densmojd](https://discourse.julialang.org/u/densmojd)\
**Replies:** 1\
**Last updated:** [August 16, 2024, 6:12pm UTC](https://discourse.julialang.org/t/partial-specification-of-parameters-for-composite-types/118283 "2024-08-16T18:12:04Z")

</div>

Today I learned: julia\> struct S{A,B} end julia\> s = S{Int, Float64}() S{Int64, Float64}() julia\> s isa S{Int} true julia\> s isa S{Float64} false So I can drop trailing parameter specifications from a composite type an…

---

## [How to locate singularities in a DiffEq system?](https://discourse.julialang.org/t/how-to-locate-singularities-in-a-diffeq-system/118155)

<div class="topic-metadata">

**Author:** [@rcorless](https://discourse.julialang.org/u/rcorless)\
**Replies:** 10\
**Last updated:** [August 16, 2024, 4:51pm UTC](https://discourse.julialang.org/t/how-to-locate-singularities-in-a-diffeq-system/118155 "2024-08-16T16:51:22Z")

</div>

Hello. New to Julia, so my question is tentative (and might be being posted in the wrong place). I am looking for singularity detection features in the solvers in DifferentialEquations.jl, and I am not seeing any. The…

---

## [Reduce allocations in 'reduce + eachcol' call to multiply several columns elementwise](https://discourse.julialang.org/t/reduce-allocations-in-reduce-eachcol-call-to-multiply-several-columns-elementwise/118234)

<div class="topic-metadata">

**Author:** [@JADekker](https://discourse.julialang.org/u/JADekker)\
**Replies:** 6\
**Last updated:** [August 16, 2024, 2:05pm UTC](https://discourse.julialang.org/t/reduce-allocations-in-reduce-eachcol-call-to-multiply-several-columns-elementwise/118234 "2024-08-16T14:05:26Z")

</div>

Hi, I find that using reduce + eachcol in the following allocates more than I would like. The point is to element-wise multiply some columns of X. I’m getting n allocations where n is the number of rows when using reduce …

---

## [Available color scheme in colormap function](https://discourse.julialang.org/t/available-color-scheme-in-colormap-function/118256)

<div class="topic-metadata">

**Author:** [@pritamsinha](https://discourse.julialang.org/u/pritamsinha)\
**Replies:** 1\
**Last updated:** [August 16, 2024, 2:11pm UTC](https://discourse.julialang.org/t/available-color-scheme-in-colormap-function/118256 "2024-08-16T14:11:57Z")

</div>

Hi! I am using the colormap function and I can only see rdbu in diverging colors and there are others like blues, greens etc in sequential. Is there any other colorscheme other than rdbu? If so, how to add that. A code …

---

## [Allocation-efficient calculation of Hermite (and Laguerre) polynomials](https://discourse.julialang.org/t/allocation-efficient-calculation-of-hermite-and-laguerre-polynomials/118220)

<div class="topic-metadata">

**Author:** [@JADekker](https://discourse.julialang.org/u/JADekker)\
**Replies:** 5\
**Last updated:** [August 16, 2024, 7:45am UTC](https://discourse.julialang.org/t/allocation-efficient-calculation-of-hermite-and-laguerre-polynomials/118220 "2024-08-16T07:45:54Z")

</div>

un-XY: I’m working on a project that involves a lot of simulation, for which I need to compute basis-functions based on the simulated quantities repeatedly. I’m writing code that allows me to flexibly mix-and-match vario…

---

## [Adjoint vector boundary condition](https://discourse.julialang.org/t/adjoint-vector-boundary-condition/118149)

<div class="topic-metadata">

**Author:** [@mary](https://discourse.julialang.org/u/mary)\
**Replies:** 1\
**Last updated:** [August 15, 2024, 7:31pm UTC](https://discourse.julialang.org/t/adjoint-vector-boundary-condition/118149 "2024-08-15T19:31:48Z")

</div>

Hi, I am using Gridap to find adjoint vectors in finite element space. Assume that I have a beam with applied displacement as boundary condition on a line. In this case I got discontinuities in values of adjoint vectors.…

---

## [Help with for-loops optimization / Translation from Matlab](https://discourse.julialang.org/t/help-with-for-loops-optimization-translation-from-matlab/118204)

<div class="topic-metadata">

**Author:** [@Benjamin7](https://discourse.julialang.org/u/Benjamin7)\
**Replies:** 7\
**Last updated:** [August 15, 2024, 7:42am UTC](https://discourse.julialang.org/t/help-with-for-loops-optimization-translation-from-matlab/118204 "2024-08-15T07:42:59Z")

</div>

Hi, I have been asked to translate a matlab code to Julia to gain speed, what I have done is to put each for loop with the @inbound, put each array and all important code in a function, I have defined the type of almost …

---

## [Word Documents and PDFs in Julia](https://discourse.julialang.org/t/word-documents-and-pdfs-in-julia/118175)

<div class="topic-metadata">

**Author:** [@John\_Finseth](https://discourse.julialang.org/u/John_Finseth)\
**Replies:** 4\
**Last updated:** [August 15, 2024, 4:06am UTC](https://discourse.julialang.org/t/word-documents-and-pdfs-in-julia/118175 "2024-08-15T04:06:05Z")

</div>

I’m working with folders of PDFs and .docx documents in Julia. I’ve been trying to find some packages to help me deal with this, but I only really found Docx (I’ve taken care of the PDFs). While I can the documents with …

---

## [Unfamiliar error](https://discourse.julialang.org/t/unfamiliar-error/117684)

<div class="topic-metadata">

**Author:** [@coverton](https://discourse.julialang.org/u/coverton)\
**Replies:** 9\
**Last updated:** [August 13, 2024, 8:35pm UTC](https://discourse.julialang.org/t/unfamiliar-error/117684 "2024-08-13T20:35:39Z")

</div>

I am receiving an error that I can find no documentation on. While running a GeneralizedLinearMixedModel using JuliaCall/RCall I am getting this error: number of averaging steps \> 10 with the following Stacktrace: S…

---

## [How to compile special characters in function name, like δ, by Documenter.jl?](https://discourse.julialang.org/t/how-to-compile-special-characters-in-function-name-like-by-documenter-jl/118070)

<div class="topic-metadata">

**Author:** [@XuJingye2022](https://discourse.julialang.org/u/XuJingye2022)\
**Replies:** 1\
**Last updated:** [August 13, 2024, 6:41pm UTC](https://discourse.julialang.org/t/how-to-compile-special-characters-in-function-name-like-by-documenter-jl/118070 "2024-08-13T18:41:57Z")

</div>

Hello, I encountered an issure while writing my documentation by Documenter.jl. And it seems that there are no corresponding examples in the official documentation. There exists a ∇ character in my function name and it’…

---

## [Code works when debugging but not otherwise in repl](https://discourse.julialang.org/t/code-works-when-debugging-but-not-otherwise-in-repl/118137)

<div class="topic-metadata">

**Author:** [@PeterCourcoux](https://discourse.julialang.org/u/PeterCourcoux)\
**Replies:** 1\
**Last updated:** [August 13, 2024, 4:49pm UTC](https://discourse.julialang.org/t/code-works-when-debugging-but-not-otherwise-in-repl/118137 "2024-08-13T16:49:31Z")

</div>

I have the following code: !/usr/bin/env julia …

---

## [PSA: How to help yourself debug differential equation solving issues](https://discourse.julialang.org/t/psa-how-to-help-yourself-debug-differential-equation-solving-issues/62489)

<div class="topic-metadata">

**Author:** [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Replies:** 0\
**Last updated:** [June 7, 2021, 4:16am UTC](https://discourse.julialang.org/t/psa-how-to-help-yourself-debug-differential-equation-solving-issues/62489 "2021-06-07T04:16:54Z")

</div>

Debugging differential equation solver issues almost always boils down to doing the same thing, so this is a summary to help you out. For more information on specific issues, check out the FAQ section of the Differential…

---

## [Exception: EXCEPTION\_ACCESS\_VIOLATION at 0x7fff65494f16 -- unknown function (ip: 00007fff65494f16)](https://discourse.julialang.org/t/exception-exception-access-violation-at-0x7fff65494f16-unknown-function-ip-00007fff65494f16/118123)

<div class="topic-metadata">

**Author:** [@tom880245](https://discourse.julialang.org/u/tom880245)\
**Replies:** 2\
**Last updated:** [August 13, 2024, 3:39pm UTC](https://discourse.julialang.org/t/exception-exception-access-violation-at-0x7fff65494f16-unknown-function-ip-00007fff65494f16/118123 "2024-08-13T15:39:51Z")

</div>

I encountered an issue when trying to load a saved model in Julia. Here is the code I used: import BSON: @load,@save using Flux using CUDA using cuDNN using DataFrames using CSV severity\_levels = \["A", "B", "C"\] mo…

---

## [Converting a multivariate function to a single variate function](https://discourse.julialang.org/t/converting-a-multivariate-function-to-a-single-variate-function/21661)

<div class="topic-metadata">

**Author:** [@StevenSiew](https://discourse.julialang.org/u/StevenSiew)\
**Replies:** 14\
**Last updated:** [August 13, 2024, 12:57pm UTC](https://discourse.julialang.org/t/converting-a-multivariate-function-to-a-single-variate-function/21661 "2024-08-13T12:57:05Z")

</div>

I want to convert a multivariate function into a single variable function. Aka to perform partial differentiation. While my attempt works but it is such an ugly kludge. Is there a better way of doing this? func1(x,y) = …

---

## [JuliaHub Sign-up not working](https://discourse.julialang.org/t/juliahub-sign-up-not-working/118119)

<div class="topic-metadata">

**Author:** [@jdm204](https://discourse.julialang.org/u/jdm204)\
**Replies:** 2\
**Last updated:** [August 13, 2024, 10:29am UTC](https://discourse.julialang.org/t/juliahub-sign-up-not-working/118119 "2024-08-13T10:29:32Z")

</div>

Hi - I wasn’t sure of the right place to ask this, but I’m trying to sign up to JuliaHub and hitting a bug - after I hit the “get started for free” button, I get this page, which has persisted overnight, and reappears wh…

---

## [Julia -\> C (Pthread) -\> Julia Saxpy with Threads](https://discourse.julialang.org/t/julia-c-pthread-julia-saxpy-with-threads/118097)

<div class="topic-metadata">

**Author:** [@miniskar](https://discourse.julialang.org/u/miniskar)\
**Replies:** 1\
**Last updated:** [August 12, 2024, 4:49pm UTC](https://discourse.julialang.org/t/julia-c-pthread-julia-saxpy-with-threads/118097 "2024-08-12T16:49:28Z")

</div>

I am having an C++ library environment where I am supposed to call Julia kernel (example SAXPY) with threading. A minimum work example to illustrate the issue is given below. The Julia main() function calls ‘call\_direc…

---

## [How to create subdivisions on grids?](https://discourse.julialang.org/t/how-to-create-subdivisions-on-grids/118065)

<div class="topic-metadata">

**Author:** [@JCaro](https://discourse.julialang.org/u/JCaro)\
**Replies:** 8\
**Last updated:** [August 12, 2024, 4:10pm UTC](https://discourse.julialang.org/t/how-to-create-subdivisions-on-grids/118065 "2024-08-12T16:10:22Z")

</div>

I need to work on a simulation and i want to make a gridspace and sub-divide it, using random points in the grid and their respectivly voronoi polygons. Can someone give some directions on how/how not do it?? a image of…

---

## [ZeroTangent definition](https://discourse.julialang.org/t/zerotangent-definition/118069)

<div class="topic-metadata">

**Author:** [@mary](https://discourse.julialang.org/u/mary)\
**Replies:** 2\
**Last updated:** [August 12, 2024, 4:55am UTC](https://discourse.julialang.org/t/zerotangent-definition/118069 "2024-08-12T04:55:02Z")

</div>

Hi, I am using chainrulecore for gradient calculation and rrule. I am trying to follow tutorial 18 of gridap. I cant understand the ZeroTangent in the code why we are using that and what it is suppose to do. I’ve read s…

---

## [Converting CSV to Parquet in Julia](https://discourse.julialang.org/t/converting-csv-to-parquet-in-julia/57328)

<div class="topic-metadata">

**Author:** [@oo92](https://discourse.julialang.org/u/oo92)\
**Replies:** 22\
**Last updated:** [August 11, 2024, 1:08pm UTC](https://discourse.julialang.org/t/converting-csv-to-parquet-in-julia/57328 "2024-08-11T13:08:25Z")

</div>

Hi. I have a simple dataframe that I want to convert to parquet. This is my attempt: begin df = CSV.read("/home/onur/julia-assignment/temp.csv", DataFrame) prq = Parquet.File(df) end But this is the error I’m gettin…

---

## [Writing data from Julia to an Excel Spreadsheet](https://discourse.julialang.org/t/writing-data-from-julia-to-an-excel-spreadsheet/53378)

<div class="topic-metadata">

**Author:** [@Peter-Jolly](https://discourse.julialang.org/u/Peter-Jolly)\
**Replies:** 18\
**Last updated:** [August 10, 2024, 6:39pm UTC](https://discourse.julialang.org/t/writing-data-from-julia-to-an-excel-spreadsheet/53378 "2024-08-10T18:39:44Z")

</div>

Hi, I am having some issues with exporting data to excel, using the XLSX package. In my Julia script I have a loop (I = 9000) whereby at each step (value oof i) I need to write out a vector y (130 elements) and several o…

---

## [Installation has gotten worse](https://discourse.julialang.org/t/installation-has-gotten-worse/118012)

<div class="topic-metadata">

**Author:** [@LordAncient](https://discourse.julialang.org/u/LordAncient)\
**Replies:** 8\
**Last updated:** [August 10, 2024, 1:42pm UTC](https://discourse.julialang.org/t/installation-has-gotten-worse/118012 "2024-08-10T13:42:46Z")

</div>

Installing Julia used to be easier; it used to work like every other “app” on my Mac. Now, I’m asked to copy/paste some command (no explanation on the options on that command, isn’t it bad form to train users to copy/pas…

---

## [Sharing project with computers that don't have Julia installed](https://discourse.julialang.org/t/sharing-project-with-computers-that-dont-have-julia-installed/118005)

<div class="topic-metadata">

**Author:** [@TravisB](https://discourse.julialang.org/u/TravisB)\
**Replies:** 8\
**Last updated:** [August 9, 2024, 10:29pm UTC](https://discourse.julialang.org/t/sharing-project-with-computers-that-dont-have-julia-installed/118005 "2024-08-09T22:29:56Z")

</div>

I’m wondering what methods or packages exist to share a Julia project to other computers that don’t have Julia installed. The Julia code would be part of a commercial program, and we don’t want to require nontechnical en…

---

## [Cumbersome array reshaping for broadcasting, unlike numpy](https://discourse.julialang.org/t/cumbersome-array-reshaping-for-broadcasting-unlike-numpy/21566)

<div class="topic-metadata">

**Author:** [@jules](https://discourse.julialang.org/u/jules)\
**Replies:** 24\
**Last updated:** [August 9, 2024, 9:51am UTC](https://discourse.julialang.org/t/cumbersome-array-reshaping-for-broadcasting-unlike-numpy/21566 "2024-08-09T09:51:24Z")

</div>

I’m still new to julia but one of my favorite aspects is dotted broadcasting syntax with my own custom and fast functions. However, in many cases I still find it cumbersome to use this functionality compared to my usual …

[Previous page](https://discourse.julialang.org/c/first-steps/8.md?page=35)

[Next page](https://discourse.julialang.org/c/first-steps/8.md?page=37)
