# Function change

**URL:** https://discourse.julialang.org/t/function-change/16553
**Category:** General Usage
**Tags:** question
**Created:** [October 20, 2018, 8:33am UTC](https://discourse.julialang.org/t/function-change/16553 "2018-10-20T08:33:29Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![lannisite110](https://avatars.discourse-cdn.com/v4/letter/l/df705f/32.png) [@lannisite110](https://discourse.julialang.org/u/lannisite110)
#### Post date: [October 20, 2018, 8:33am UTC](https://discourse.julialang.org/t/function-change/16553/1 "2018-10-20T08:33:29Z")

</div>

this is the function. x is a 4 dim arrays. y is 2 dim arrays.  
i want to push data with size of batchsize to data arrays.  
however the error says that cget isn’t defined. so do you  
know the function names that cget changed to.

```julia
function minibatch(x, y, batchsize)
    data = Any[]
    #for i=1:batchsize:ccount(x)-batchsize+1
    for i=1:batchsize:size(x,4)-batchsize+1
        j=i+batchsize-1
        push!(data, (cget(x,i:j), cget(y,i:j)))
    end
    return data
end

```

the following is error information

```julia
ERROR: LoadError: UndefVarError: cget not defined

```

---

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [October 20, 2018, 8:40am UTC](https://discourse.julialang.org/t/function-change/16553/2 "2018-10-20T08:40:22Z")

</div>

please quote your code, post an MWE

> [@Please read: make it easier to help you](https://discourse.julialang.org/t/psa-make-it-easier-to-help-you/14757):
>
> Welcome to the Julia Discourse! We are enthusiastic about helping Julia programmers, both beginner and experienced. This public service announcement (PSA) outlines best practices when asking for help. Following these points makes it easier for us to help you and more likely you’ll get a prompt, useful answer. Keywords are highlighted to make it easier to refer to specific points. Choose a descriptive title that captures the key part of your question, eg “plots with multiple axes” instead of …

---

<div class="post-metadata">

### Author: ![Tero\_Frondelius](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tero_frondelius/32/7629_2.png) [@Tero\_Frondelius](https://discourse.julialang.org/u/Tero_Frondelius)
#### Post date: [October 20, 2018, 1:29pm UTC](https://discourse.julialang.org/t/function-change/16553/3 "2018-10-20T13:29:29Z")

</div>

You should post a minimum working example. I tried your code with julia 0.7 and 0.6 and I got the same error that you post: cget is not defined. Clearly something is missing from your code snippet, possible import of an external package.
