<commit_before>package breeze.linalg

import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
import org.scalatest.FunSuite

/**
 * @author ktakagaki
 * @date 04/16/2014.
 */
@RunWith(classOf[JUnitRunner])
class padTest extends FunSuite {

  val testDVI = DenseVector(1,2,3,4,5)
  val testDMI = DenseVector(1,2,3,4,5).t
  val testDVD = DenseVector(1d,2d,3d,4d,5d)

  test("padRight") {

    import breeze.linalg.Options._

    assert( padRight(testDVI, dimensions = 3                  ) == DenseVector(1,2,3) )
    assert( padRight(testDVD, dimensions = 7    , mode = 11d  ) == DenseVector(1d,2d,3d,4d,5d,  11d,11d) )
    assert( padRight(testDVD, dimensions = ( 7 ), mode = 11d  ) == DenseVector(1d,2d,3d,4d,5d,  11d,11d) )
    assert( padRight(testDVD, 7                 , 10d         ) == DenseVector(1d,2d,3d,4d,5d,  10d,10d) )
    assert( padRight(testDVD, 7                 , Value(10d)  ) == DenseVector(1d,2d,3d,4d,5d,  10d,10d) )
    assert( padRight(testDVI, 7                 , Min         ) == DenseVector(1,2,3,4,5,  1,1) )<commit_msg>unnecessary pad test... don't use Tuple1 !<commit_after>package breeze.linalg

import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
import org.scalatest.FunSuite

/**
 * @author ktakagaki
 * @date 04/16/2014.
 */
@RunWith(classOf[JUnitRunner])
class padTest extends FunSuite {

  val testDVI = DenseVector(1,2,3,4,5)
  val testDMI = DenseVector(1,2,3,4,5).t
  val testDVD = DenseVector(1d,2d,3d,4d,5d)

  test("padRight") {

    import breeze.linalg.Options._

    assert( padRight(testDVI, dimensions = 3                  ) == DenseVector(1,2,3) )
    assert( padRight(testDVD, dimensions = 7    , mode = 11d  ) == DenseVector(1d,2d,3d,4d,5d,  11d,11d) )
    assert( padRight(testDVD, 7                 , 10d         ) == DenseVector(1d,2d,3d,4d,5d,  10d,10d) )
    assert( padRight(testDVD, 7                 , Value(10d)  ) == DenseVector(1d,2d,3d,4d,5d,  10d,10d) )
    assert( padRight(testDVI, 7                 , Min         ) == DenseVector(1,2,3,4,5,  1,1) )
{'fraction_non_alphanumeric': 0.14892578125, 'fraction_numerical': 0.07568359375, 'mean_word_length': 3.025540275049116, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6340811', 'n_tokens_mistral': 904, 'n_tokens_neox': 841, 'n_words': 134}