Commit eb6a9f69a9e45a2df01ba8f70c7ea47311ace435
- Diff rendering mode:
- inline
- side by side
README
(2 / 1)
|   | |||
| 11 | 11 | ------------------------------------------------------------------------------ | |
| 12 | 12 | ||
| 13 | 13 | This program is distributed under the terms of the GNU General Public License | |
| 14 | (GPL), version 2. This means that you can freely modify, copy and distribute | ||
| 14 | (GPL), version 2, or (at your option), any later version. | ||
| 15 | This means that you can freely modify, copy and distribute | ||
| 15 | 16 | the program, under the terms of said license. The COPYING file gives a good | |
| 16 | 17 | overview of what you can and can't do. | |
| 17 | 18 |
datamatrix/datamatrix.py
(31 / 2)
|   | |||
| 4 | 4 | # (C) 2008 Luca Beltrame (einar at heavensinferno dot net) | |
| 5 | 5 | # (C) 2008 Giovanni Marco Dall'Olio (dalloliogm at gmail dot com) | |
| 6 | 6 | # This program is distributed under the terms of the GNU General Public | |
| 7 | # License (GPL), version 2. See the file COPYING for details. | ||
| 7 | # License (GPL), version 2, or (at your option) any later version. | ||
| 8 | # See the file COPYING for details. | ||
| 8 | 9 | # --------------------------------------------------------------------------- | |
| 9 | 10 | ||
| 10 | 11 | "Module providing a Pythonic implementation of a data.frame." | |
| … | … | ||
| 20 | 20 | ||
| 21 | 21 | __author__ = "Luca Beltrame" | |
| 22 | 22 | __copyright__ = "Copyright 2008, Luca Beltrame, Giovanni Marco Dall'Olio" | |
| 23 | __license__ = "GPL (v2)" | ||
| 23 | __license__ = "GPL (v2 or later)" | ||
| 24 | 24 | __version__ = "0.9-dev" | |
| 25 | 25 | __status__ = "Development" | |
| 26 | 26 | ||
| … | … | ||
| 644 | 644 | ||
| 645 | 645 | return matrixApply(sourceMatrix, _mean, | |
| 646 | 646 | resultName="Mean value", what="rows") | |
| 647 | |||
| 648 | def transpose(matrix, identifier="x"): | ||
| 649 | |||
| 650 | """Transposes a DataMatrix object: rows become columns and vice versa. The | ||
| 651 | optional parameter ``identifier`` is passed as the resulting matrix's | ||
| 652 | identifer name.""" | ||
| 653 | |||
| 654 | destination = EmptyMatrix(identifier = identifier, | ||
| 655 | row_names = matrix.columns) | ||
| 656 | for index in range(0, len(matrix.rownames)): | ||
| 657 | row_index = index + 1 | ||
| 658 | column = matrix.getRow(row_index, row_name=False) | ||
| 659 | destination.append(column, matrix.rownames[index]) | ||
| 660 | |||
| 661 | return destination | ||
| 662 | |||
| 663 | def subset(matrix, column_list): | ||
| 664 | |||
| 665 | """Creates a new matrix with only a subset of the columns present, as | ||
| 666 | specified by the columns_list parameter.""" | ||
| 667 | |||
| 668 | destination = EmptyMatrix(row_names=matrix.rownames, | ||
| 669 | identifier=matrix.identifier) | ||
| 670 | for column in column_list: | ||
| 671 | if column in matrix: | ||
| 672 | destination.append(matrix[column], column) | ||
| 673 | |||
| 674 | return destination | ||
| 647 | 675 | ||
| 648 | 676 | def _test(): | |
| 649 | 677 | import doctest |
doc_sources/license.rst
(1 / 2)
|   | |||
| 2 | 2 | License | |
| 3 | 3 | ******* | |
| 4 | 4 | ||
| 5 | This program is distributed under the terms of the GNU General Public License (GPL), version 2. This means that you can freely modify, copy and distribute | ||
| 6 | the program, under the terms of said license. The COPYING file gives a good overview of what you can and can't do. | ||
| 5 | This program is distributed under the terms of the GNU General Public License (GPL), version 2, or (at your option), any later version. This means that you can freely modify, copy and distribute the program, under the terms of said license. The COPYING file gives a good overview of what you can and can't do. | ||
| 7 | 6 | ||
| 8 | 7 | Although we hope that this program will be useful, it is without ANY WARRANTY, without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |

