Convenient functions for Matrices

This PR addresses issue #275. A function similar to [NumPy's eye function](http://docs.scipy.org/doc/numpy/reference/generated/numpy.eye.html) is implemented.

#### TODO

- [x] Add a function for creating diagonal matrices

##### Optional
- [x] Create a function similar to [numpy.ones](http://docs.scipy.org/doc/numpy/reference/generated/numpy.ones.html)
- [x] Create a function similar to [numpy.zeros](http://docs.scipy.org/doc/numpy/reference/generated/numpy.zeros.html)
You are right.

Sent from my mobile phone.
On Nov 23, 2014 10:52 PM, "Thilina Bandara Rathnayake" <
notifications@github.com> wrote:

> In src/dense_matrix.cpp:
>
> > +
> > +// Mimic `eye` function in NumPy
> > +void eye(DenseMatrix &A, unsigned N, unsigned M, int k)
> > +{
> > +    if (M == 0) {
> > +        M = N;
> > +    }
> > +
> > +    CSYMPY_ASSERT((int)-N < k && k < (int)M);
> > +
> > +    vec_basic v;
> > +
> > +    if (k > 0) {
> > +        v = vec_basic(M - k, one);
> > +    } else {
> > +        v = vec_basic(N + k, one);
>
> M and N need not to be equal all the time, for example N can be 3 and M
> can be 2. So, I guess we can't replace the above lines with a single
> statement.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/sympy/csympy/pull/332/files#r20773747>.
>