Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array[] doesnt behave how it should #143

Open
darvin opened this issue May 26, 2018 · 0 comments
Open

Array[] doesnt behave how it should #143

darvin opened this issue May 26, 2018 · 0 comments

Comments

@darvin
Copy link
Contributor

darvin commented May 26, 2018

In[10]:= Array[a, {2}] 

Out[10]= {2}

Expected:

In[212]:= Array[a, {2}]                                                                          

Out[212]= {a[1], a[2]}

In[213]:= ?Array                                                                                 
Array[f, n] generates a list of length n, with elements f[i]. 
Array[f, n, r] generates a list using the index origin r.
Array[f, n, {a, b}] generates a list using n values from a to b.
Array[f, {n , n , …}] generates an n
           1   2                      1
    ×n ×… array of nested lists, with elements f[i , i , …]. 
       2                                              1   2
Array[f, {n , n , …}, {r , r , …}] generates a list using the index origins r  (default 1). 
           1   2          1   2                                                  i
Array[f, {n , n , …}, {{a , b }, {a , b }, …}]
           1   2           1   1     2   2
    generates a list using n  values from a  to b .
                            i              i     i
Array[f, dims, origin, h] uses head h, rather than List, for each level of the array. 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant