Python numpy.core.numeric.identity() Examples
The following are 3
code examples of numpy.core.numeric.identity().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
numpy.core.numeric
, or try the search function
.
Example #1
Source File: functions.py From Computable with MIT License | 5 votes |
def identity(n,typecode='l', dtype=None): """identity(n) returns the identity 2-d array of shape n x n. """ dtype = convtypecode(typecode, dtype) return nn.identity(n, dtype)
Example #2
Source File: ma.py From Computable with MIT License | 5 votes |
def identity(n): """identity(n) returns the identity matrix of shape n x n. """ return array(numeric.identity(n))
Example #3
Source File: functions.py From biskit with GNU General Public License v3.0 | 5 votes |
def identity(n,typecode='l', dtype=None): """identity(n) returns the identity 2-d array of shape n x n. """ dtype = convtypecode(typecode, dtype) return nn.identity(n, dtype)