100% found this document useful (5 votes)
382 views

[Ebooks PDF] download Numerical Python: Scientific Computing and Data Science Applications with Numpy, Scipy and Matplotlib 2nd Edition Robert Johansson full chapters

Johansson

Uploaded by

ngorohoiyu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (5 votes)
382 views

[Ebooks PDF] download Numerical Python: Scientific Computing and Data Science Applications with Numpy, Scipy and Matplotlib 2nd Edition Robert Johansson full chapters

Johansson

Uploaded by

ngorohoiyu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

Get ebook downloads in full at ebookmeta.

com

Numerical Python: Scientific Computing and Data


Science Applications with Numpy, Scipy and
Matplotlib 2nd Edition Robert Johansson

https://ebookmeta.com/product/numerical-python-scientific-
computing-and-data-science-applications-with-numpy-scipy-
and-matplotlib-2nd-edition-robert-johansson/

OR CLICK BUTTON

DOWNLOAD NOW

Explore and download more ebook at https://ebookmeta.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Numerical Python: Scientific Computing and Data Science


Applications with Numpy, SciPy and Matplotlib - 2nd
Edition Robert Johansson
https://ebookmeta.com/product/numerical-python-scientific-computing-
and-data-science-applications-with-numpy-scipy-and-matplotlib-2nd-
edition-robert-johansson-2/
ebookmeta.com

Python Data Analytics: With Pandas, NumPy, and Matplotlib,


3rd Edition Fabio Nelli

https://ebookmeta.com/product/python-data-analytics-with-pandas-numpy-
and-matplotlib-3rd-edition-fabio-nelli/

ebookmeta.com

Python Data Analytics: With Pandas, NumPy, and Matplotlib,


3rd Edition Fabio Nelli

https://ebookmeta.com/product/python-data-analytics-with-pandas-numpy-
and-matplotlib-3rd-edition-fabio-nelli-2/

ebookmeta.com

A Christmas Maker A Billionaire Romance 1st Edition Mk


Kerrick

https://ebookmeta.com/product/a-christmas-maker-a-billionaire-
romance-1st-edition-mk-kerrick/

ebookmeta.com
Capital Markets and Institutions in Bangladesh Some
Implications of Japanese Experience 1st Edition M Farid
Ahmed
https://ebookmeta.com/product/capital-markets-and-institutions-in-
bangladesh-some-implications-of-japanese-experience-1st-edition-m-
farid-ahmed/
ebookmeta.com

Artificial Intelligence Expert Systems Sourcebook Hunt V


Daniel

https://ebookmeta.com/product/artificial-intelligence-expert-systems-
sourcebook-hunt-v-daniel/

ebookmeta.com

Phasors for Measurement and Control 1st Edition Gerard


Ledwich

https://ebookmeta.com/product/phasors-for-measurement-and-control-1st-
edition-gerard-ledwich/

ebookmeta.com

Negotiation Parenting Or how not to raise a brat in today


s complex world 1st Edition Dr Foo Koong Hean

https://ebookmeta.com/product/negotiation-parenting-or-how-not-to-
raise-a-brat-in-today-s-complex-world-1st-edition-dr-foo-koong-hean/

ebookmeta.com

Pretty Little Mess 1st Edition Nichole Rose

https://ebookmeta.com/product/pretty-little-mess-1st-edition-nichole-
rose/

ebookmeta.com
Neurocutaneous Disorders: A Clinical, Diagnostic and
Therapeutic Approach 3rd Edition Christos P. Panteliadis

https://ebookmeta.com/product/neurocutaneous-disorders-a-clinical-
diagnostic-and-therapeutic-approach-3rd-edition-christos-p-
panteliadis/
ebookmeta.com
Numerical
Python
Scientific Computing and Data Science
Applications with Numpy,
SciPy and Matplotlib

Second Edition

Robert Johansson
Numerical Python
Scientific Computing and Data
Science Applications with Numpy,
SciPy and Matplotlib
Second Edition

Robert Johansson
Numerical Python: Scientific Computing and Data Science Applications with
Numpy, SciPy and Matplotlib
Robert Johansson
Urayasu-shi, Chiba, Japan

ISBN-13 (pbk): 978-1-4842-4245-2 ISBN-13 (electronic): 978-1-4842-4246-9


https://doi.org/10.1007/978-1-4842-4246-9
Library of Congress Control Number: 2018966798

Copyright © 2019 by Robert Johansson


This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the
material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation,
broadcasting, reproduction on microfilms or in any other physical way, and transmission or information
storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now
known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with
every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an
editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the
trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not
identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to
proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication,
neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or
omissions that may be made. The publisher makes no warranty, express or implied, with respect to the
material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: Todd Green
Development Editor: James Markham
Coordinating Editor: Jill Balzano
Cover designed by eStudioCalamar
Cover image designed by Freepik (www.freepik.com)
Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street,
6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-
sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member
(owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a
Delaware corporation.
For information on translations, please e-mail editorial@apress.com; for reprint, paperback, or audio rights,
please email bookpermissions@springernature.com.
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and
licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales
web page at http://www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is available to
readers on GitHub via the book's product page, located at www.apress.com/9781484242452. For more
detailed information, please visit http://www.apress.com/source-code.
Printed on acid-free paper
To Mika and Erika.
Table of Contents
About the Author .....................................................................................................xv

About the Technical Reviewers .............................................................................xvii

Introduction ............................................................................................................xxi

Chapter 1: Introduction to Computing with Python .................................................. 1


Environments for Computing with Python ������������������������������������������������������������������������������������ 5
Python ������������������������������������������������������������������������������������������������������������������������������������������� 6
Interpreter ������������������������������������������������������������������������������������������������������������������������������� 7
IPython Console ���������������������������������������������������������������������������������������������������������������������������� 8
Input and Output Caching �������������������������������������������������������������������������������������������������������� 9
Autocompletion and Object Introspection ����������������������������������������������������������������������������� 11
Documentation ���������������������������������������������������������������������������������������������������������������������� 11
Interaction with the System Shell ����������������������������������������������������������������������������������������� 12
IPython Extensions ���������������������������������������������������������������������������������������������������������������� 13
Jupyter ���������������������������������������������������������������������������������������������������������������������������������������� 19
The Jupyter QtConsole ���������������������������������������������������������������������������������������������������������� 20
The Jupyter Notebook ����������������������������������������������������������������������������������������������������������� 21
Jupyter Lab���������������������������������������������������������������������������������������������������������������������������� 24
Cell Types������������������������������������������������������������������������������������������������������������������������������� 25
Editing Cells ��������������������������������������������������������������������������������������������������������������������������� 26
Markdown Cells ��������������������������������������������������������������������������������������������������������������������� 28
Rich Output Display ��������������������������������������������������������������������������������������������������������������� 30
nbconvert ������������������������������������������������������������������������������������������������������������������������������ 34

v
TABLE OF CONTENTS

Spyder: An Integrated Development Environment ���������������������������������������������������������������������� 37


Source Code Editor ���������������������������������������������������������������������������������������������������������������� 38
Consoles in Spyder ���������������������������������������������������������������������������������������������������������������� 40
Object Inspector �������������������������������������������������������������������������������������������������������������������� 40
Summary������������������������������������������������������������������������������������������������������������������������������������� 41
Further Reading �������������������������������������������������������������������������������������������������������������������������� 41
References ���������������������������������������������������������������������������������������������������������������������������������� 41

Chapter 2: Vectors, Matrices, and Multidimensional Arrays ................................. 43


Importing the Modules ���������������������������������������������������������������������������������������������������������������� 44
The NumPy Array Object ������������������������������������������������������������������������������������������������������������� 44
Data Types ����������������������������������������������������������������������������������������������������������������������������� 46
Order of Array Data in Memory ���������������������������������������������������������������������������������������������� 49
Creating Arrays ��������������������������������������������������������������������������������������������������������������������������� 50
Arrays Created from Lists and Other Array-Like Objects ������������������������������������������������������� 52
Arrays Filled with Constant Values ���������������������������������������������������������������������������������������� 52
Arrays Filled with Incremental Sequences ���������������������������������������������������������������������������� 54
Arrays Filled with Logarithmic Sequences ���������������������������������������������������������������������������� 54
Meshgrid Arrays �������������������������������������������������������������������������������������������������������������������� 55
Creating Uninitialized Arrays ������������������������������������������������������������������������������������������������� 56
Creating Arrays with Properties of Other Arrays �������������������������������������������������������������������� 56
Creating Matrix Arrays ����������������������������������������������������������������������������������������������������������� 57
Indexing and Slicing�������������������������������������������������������������������������������������������������������������������� 58
One-Dimensional Arrays �������������������������������������������������������������������������������������������������������� 58
Multidimensional Arrays �������������������������������������������������������������������������������������������������������� 60
Views ������������������������������������������������������������������������������������������������������������������������������������� 62
Fancy Indexing and Boolean-Valued Indexing ����������������������������������������������������������������������� 63
Reshaping and Resizing �������������������������������������������������������������������������������������������������������������� 66
Vectorized Expressions ��������������������������������������������������������������������������������������������������������������� 70
Arithmetic Operations ������������������������������������������������������������������������������������������������������������ 72
Elementwise Functions ��������������������������������������������������������������������������������������������������������� 76

vi
TABLE OF CONTENTS

Aggregate Functions ������������������������������������������������������������������������������������������������������������� 79


Boolean Arrays and Conditional Expressions ������������������������������������������������������������������������ 82
Set Operations ����������������������������������������������������������������������������������������������������������������������� 85
Operations on Arrays ������������������������������������������������������������������������������������������������������������� 87
Matrix and Vector Operations ������������������������������������������������������������������������������������������������������ 88
Summary������������������������������������������������������������������������������������������������������������������������������������� 95
Further Reading �������������������������������������������������������������������������������������������������������������������������� 95
References ���������������������������������������������������������������������������������������������������������������������������������� 96

Chapter 3: Symbolic Computing ............................................................................. 97


Importing SymPy ������������������������������������������������������������������������������������������������������������������������� 98
Symbols �������������������������������������������������������������������������������������������������������������������������������������� 99
Numbers ������������������������������������������������������������������������������������������������������������������������������ 102
Expressions ������������������������������������������������������������������������������������������������������������������������������� 109
Manipulating Expressions ��������������������������������������������������������������������������������������������������������� 110
Simplification����������������������������������������������������������������������������������������������������������������������� 111
Expand ��������������������������������������������������������������������������������������������������������������������������������� 112
Factor, Collect, and Combine ����������������������������������������������������������������������������������������������� 114
Apart, Together, and Cancel ������������������������������������������������������������������������������������������������� 115
Substitutions ����������������������������������������������������������������������������������������������������������������������� 115
Numerical Evaluation ���������������������������������������������������������������������������������������������������������������� 117
Calculus ������������������������������������������������������������������������������������������������������������������������������������ 118
Derivatives ��������������������������������������������������������������������������������������������������������������������������� 119
Integrals ������������������������������������������������������������������������������������������������������������������������������ 121
Series ���������������������������������������������������������������������������������������������������������������������������������� 123
Limits ����������������������������������������������������������������������������������������������������������������������������������� 125
Sums and Products ������������������������������������������������������������������������������������������������������������� 126
Equations ���������������������������������������������������������������������������������������������������������������������������������� 127
Linear Algebra ��������������������������������������������������������������������������������������������������������������������������� 130

vii
TABLE OF CONTENTS

Summary����������������������������������������������������������������������������������������������������������������������������������� 134
Further Reading ������������������������������������������������������������������������������������������������������������������������ 134
Reference ���������������������������������������������������������������������������������������������������������������������������������� 134

Chapter 4: Plotting and Visualization ................................................................... 135


Importing Modules �������������������������������������������������������������������������������������������������������������������� 136
Getting Started �������������������������������������������������������������������������������������������������������������������������� 137
Interactive and Noninteractive Modes ��������������������������������������������������������������������������������� 141
Figure ���������������������������������������������������������������������������������������������������������������������������������������� 143
Axes ������������������������������������������������������������������������������������������������������������������������������������������ 145
Plot Types ���������������������������������������������������������������������������������������������������������������������������� 146
Line Properties �������������������������������������������������������������������������������������������������������������������� 147
Legends ������������������������������������������������������������������������������������������������������������������������������� 152
Text Formatting and Annotations ����������������������������������������������������������������������������������������� 153
Axis Properties �������������������������������������������������������������������������������������������������������������������� 156
Advanced Axes Layouts ������������������������������������������������������������������������������������������������������������ 168
Insets ����������������������������������������������������������������������������������������������������������������������������������� 168
Subplots ������������������������������������������������������������������������������������������������������������������������������ 170
Subplot2grid ������������������������������������������������������������������������������������������������������������������������ 172
GridSpec ������������������������������������������������������������������������������������������������������������������������������ 173
Colormap Plots �������������������������������������������������������������������������������������������������������������������������� 174
3 D Plots ������������������������������������������������������������������������������������������������������������������������������������ 177
Summary����������������������������������������������������������������������������������������������������������������������������������� 180
Further Reading ������������������������������������������������������������������������������������������������������������������������ 180
References �������������������������������������������������������������������������������������������������������������������������������� 181

Chapter 5: Equation Solving ................................................................................. 183


Importing Modules �������������������������������������������������������������������������������������������������������������������� 184
Linear Equation Systems ���������������������������������������������������������������������������������������������������������� 185
Square Systems ������������������������������������������������������������������������������������������������������������������ 186
Rectangular Systems����������������������������������������������������������������������������������������������������������� 192

viii
TABLE OF CONTENTS

Eigenvalue Problems����������������������������������������������������������������������������������������������������������������� 196


Nonlinear Equations ������������������������������������������������������������������������������������������������������������������ 198
Univariate Equations������������������������������������������������������������������������������������������������������������ 199
Systems of Nonlinear Equations������������������������������������������������������������������������������������������ 207
Summary����������������������������������������������������������������������������������������������������������������������������������� 212
Further Reading ������������������������������������������������������������������������������������������������������������������������ 212
References �������������������������������������������������������������������������������������������������������������������������������� 212

Chapter 6: Optimization ........................................................................................ 213


Importing Modules �������������������������������������������������������������������������������������������������������������������� 214
Classification of Optimization Problems ����������������������������������������������������������������������������������� 214
Univariate Optimization ������������������������������������������������������������������������������������������������������������� 217
Unconstrained Multivariate Optimization ���������������������������������������������������������������������������������� 221
Nonlinear Least Square Problems��������������������������������������������������������������������������������������������� 230
Constrained Optimization ���������������������������������������������������������������������������������������������������������� 232
Linear Programming ������������������������������������������������������������������������������������������������������������ 238
Summary����������������������������������������������������������������������������������������������������������������������������������� 241
Further Reading ������������������������������������������������������������������������������������������������������������������������ 241
References �������������������������������������������������������������������������������������������������������������������������������� 242

Chapter 7: Interpolation........................................................................................ 243


Importing Modules �������������������������������������������������������������������������������������������������������������������� 244
Interpolation ������������������������������������������������������������������������������������������������������������������������������ 244
Polynomials������������������������������������������������������������������������������������������������������������������������������� 245
Polynomial Interpolation ����������������������������������������������������������������������������������������������������������� 249
Spline Interpolation ������������������������������������������������������������������������������������������������������������������� 255
Multivariate Interpolation ���������������������������������������������������������������������������������������������������������� 258
Summary����������������������������������������������������������������������������������������������������������������������������������� 265
Further Reading ������������������������������������������������������������������������������������������������������������������������ 265
References �������������������������������������������������������������������������������������������������������������������������������� 265

ix
TABLE OF CONTENTS

Chapter 8: Integration........................................................................................... 267


Importing Modules �������������������������������������������������������������������������������������������������������������������� 268
Numerical Integration Methods������������������������������������������������������������������������������������������������� 269
Numerical Integration with SciPy���������������������������������������������������������������������������������������������� 274
Tabulated Integrand ������������������������������������������������������������������������������������������������������������� 277
Multiple Integration ������������������������������������������������������������������������������������������������������������������� 280
Symbolic and Arbitrary-Precision Integration ��������������������������������������������������������������������������� 285
Line Integrals ����������������������������������������������������������������������������������������������������������������������� 288
Integral Transforms ������������������������������������������������������������������������������������������������������������������� 289
Summary����������������������������������������������������������������������������������������������������������������������������������� 292
Further Reading ������������������������������������������������������������������������������������������������������������������������ 293
References �������������������������������������������������������������������������������������������������������������������������������� 293

Chapter 9: Ordinary Differential Equations ........................................................... 295


Importing Modules �������������������������������������������������������������������������������������������������������������������� 296
Ordinary Differential Equations ������������������������������������������������������������������������������������������������� 296
Symbolic Solution to ODEs �������������������������������������������������������������������������������������������������������� 298
Direction Fields�������������������������������������������������������������������������������������������������������������������� 304
Solving ODEs Using Laplace Transformations ��������������������������������������������������������������������� 309
Numerical Methods for Solving ODEs ��������������������������������������������������������������������������������������� 313
Numerical Integration of ODEs Using SciPy ������������������������������������������������������������������������������ 317
Summary����������������������������������������������������������������������������������������������������������������������������������� 332
Further Reading ������������������������������������������������������������������������������������������������������������������������ 333
References �������������������������������������������������������������������������������������������������������������������������������� 333

Chapter 10: Sparse Matrices and Graphs ............................................................. 335


Importing Modules �������������������������������������������������������������������������������������������������������������������� 336
Sparse Matrices in SciPy ���������������������������������������������������������������������������������������������������������� 336
Functions for Creating Sparse Matrices ������������������������������������������������������������������������������ 342
Sparse Linear Algebra Functions ����������������������������������������������������������������������������������������� 345

x
TABLE OF CONTENTS

Linear Equation Systems ����������������������������������������������������������������������������������������������������� 345


Graphs and Networks ���������������������������������������������������������������������������������������������������������� 352
Summary����������������������������������������������������������������������������������������������������������������������������������� 360
Further Reading ������������������������������������������������������������������������������������������������������������������������ 361
References �������������������������������������������������������������������������������������������������������������������������������� 361

Chapter 11: Partial Differential Equations ............................................................ 363


Importing Modules �������������������������������������������������������������������������������������������������������������������� 364
Partial Differential Equations ���������������������������������������������������������������������������������������������������� 365
Finite-Difference Methods �������������������������������������������������������������������������������������������������������� 366
Finite-Element Methods ������������������������������������������������������������������������������������������������������������ 373
Survey of FEM Libraries ������������������������������������������������������������������������������������������������������ 377
Solving PDEs Using FEniCS ������������������������������������������������������������������������������������������������������� 378
Summary����������������������������������������������������������������������������������������������������������������������������������� 403
Further Reading ������������������������������������������������������������������������������������������������������������������������ 403
References �������������������������������������������������������������������������������������������������������������������������������� 404

Chapter 12: Data Processing and Analysis ........................................................... 405


Importing Modules �������������������������������������������������������������������������������������������������������������������� 406
Introduction to Pandas �������������������������������������������������������������������������������������������������������������� 407
Series ���������������������������������������������������������������������������������������������������������������������������������� 407
DataFrame ��������������������������������������������������������������������������������������������������������������������������� 410
Time Series�������������������������������������������������������������������������������������������������������������������������� 422
The Seaborn Graphics Library��������������������������������������������������������������������������������������������������� 434
Summary����������������������������������������������������������������������������������������������������������������������������������� 440
Further Reading ������������������������������������������������������������������������������������������������������������������������ 440
References �������������������������������������������������������������������������������������������������������������������������������� 441

Chapter 13: Statistics ........................................................................................... 443


Importing Modules �������������������������������������������������������������������������������������������������������������������� 444
Review of Statistics and Probability ����������������������������������������������������������������������������������������� 444
Random Numbers ��������������������������������������������������������������������������������������������������������������������� 446
xi
TABLE OF CONTENTS

Random Variables and Distributions ����������������������������������������������������������������������������������������� 451


Hypothesis Testing �������������������������������������������������������������������������������������������������������������������� 460
Nonparametric Methods ����������������������������������������������������������������������������������������������������������� 466
Summary����������������������������������������������������������������������������������������������������������������������������������� 469
Further Reading ������������������������������������������������������������������������������������������������������������������������ 470
References �������������������������������������������������������������������������������������������������������������������������������� 470

Chapter 14: Statistical Modeling .......................................................................... 471


Importing Modules �������������������������������������������������������������������������������������������������������������������� 472
Introduction to Statistical Modeling ������������������������������������������������������������������������������������������ 473
Defining Statistical Models with Patsy�������������������������������������������������������������������������������������� 474
Linear Regression ��������������������������������������������������������������������������������������������������������������������� 485
Example Datasets ���������������������������������������������������������������������������������������������������������������� 494
Discrete Regression ������������������������������������������������������������������������������������������������������������������ 496
Logistic Regression ������������������������������������������������������������������������������������������������������������� 496
Poisson Model ��������������������������������������������������������������������������������������������������������������������� 502
Time Series ������������������������������������������������������������������������������������������������������������������������������� 506
Summary����������������������������������������������������������������������������������������������������������������������������������� 511
Further Reading ������������������������������������������������������������������������������������������������������������������������ 511
References �������������������������������������������������������������������������������������������������������������������������������� 511

Chapter 15: Machine Learning ............................................................................. 513


Importing Modules �������������������������������������������������������������������������������������������������������������������� 514
Brief Review of Machine Learning �������������������������������������������������������������������������������������������� 515
Regression �������������������������������������������������������������������������������������������������������������������������������� 518
Classification����������������������������������������������������������������������������������������������������������������������������� 529
Clustering ���������������������������������������������������������������������������������������������������������������������������������� 535
Summary����������������������������������������������������������������������������������������������������������������������������������� 540
Further Reading ������������������������������������������������������������������������������������������������������������������������ 540
References �������������������������������������������������������������������������������������������������������������������������������� 541

xii
TABLE OF CONTENTS

Chapter 16: Bayesian Statistics............................................................................ 543


Importing Modules �������������������������������������������������������������������������������������������������������������������� 544
Introduction to Bayesian Statistics ������������������������������������������������������������������������������������������� 545
Model Definition ������������������������������������������������������������������������������������������������������������������������ 548
Sampling Posterior Distributions ����������������������������������������������������������������������������������������� 553
Linear Regression ���������������������������������������������������������������������������������������������������������������� 558
Summary����������������������������������������������������������������������������������������������������������������������������������� 571
Further Reading ������������������������������������������������������������������������������������������������������������������������ 572
References �������������������������������������������������������������������������������������������������������������������������������� 572

Chapter 17: Signal Processing ............................................................................. 573


Importing Modules �������������������������������������������������������������������������������������������������������������������� 574
Spectral Analysis����������������������������������������������������������������������������������������������������������������������� 574
Fourier Transforms �������������������������������������������������������������������������������������������������������������� 575
Windowing ��������������������������������������������������������������������������������������������������������������������������� 581
Spectrogram ������������������������������������������������������������������������������������������������������������������������ 585
Signal Filters ����������������������������������������������������������������������������������������������������������������������������� 590
Convolution Filters ��������������������������������������������������������������������������������������������������������������� 590
FIR and IIR Filters ���������������������������������������������������������������������������������������������������������������� 593
Summary����������������������������������������������������������������������������������������������������������������������������������� 598
Further Reading ������������������������������������������������������������������������������������������������������������������������ 599
References �������������������������������������������������������������������������������������������������������������������������������� 599

Chapter 18: Data Input and Output ....................................................................... 601


Importing Modules �������������������������������������������������������������������������������������������������������������������� 602
Comma-Separated Values��������������������������������������������������������������������������������������������������������� 603
HDF5 ����������������������������������������������������������������������������������������������������������������������������������������� 608
h5py ������������������������������������������������������������������������������������������������������������������������������������� 610
PyTables ������������������������������������������������������������������������������������������������������������������������������ 623
Pandas HDFStore ����������������������������������������������������������������������������������������������������������������� 629

xiii
TABLE OF CONTENTS

JSON ����������������������������������������������������������������������������������������������������������������������������������������� 631


Serialization ������������������������������������������������������������������������������������������������������������������������������ 636
Summary����������������������������������������������������������������������������������������������������������������������������������� 639
Further Reading ������������������������������������������������������������������������������������������������������������������������ 639
Reference ���������������������������������������������������������������������������������������������������������������������������������� 640

Chapter 19: Code Optimization ............................................................................. 641


Importing Modules �������������������������������������������������������������������������������������������������������������������� 644
Numba��������������������������������������������������������������������������������������������������������������������������������������� 644
Cython ��������������������������������������������������������������������������������������������������������������������������������������� 652
Summary����������������������������������������������������������������������������������������������������������������������������������� 664
Further Reading ������������������������������������������������������������������������������������������������������������������������ 665
References �������������������������������������������������������������������������������������������������������������������������������� 665

Appendix: Installation........................................................................................... 667


Miniconda and Conda ��������������������������������������������������������������������������������������������������������������� 668
A Complete Environment����������������������������������������������������������������������������������������������������������� 676
Summary����������������������������������������������������������������������������������������������������������������������������������� 680
Further Reading ������������������������������������������������������������������������������������������������������������������������ 680

Index ..................................................................................................................... 683

xiv
About the Author
Robert Johansson is an experienced Python programmer
and computational scientist, with a Ph.D. in Theoretical
Physics from Chalmers University of Technology, Sweden.
He has worked with scientific computing in academia and
industry for over 10 years, and he has participated in both
open source development and proprietary research projects.
His open source contributions include work on QuTiP, a
popular Python framework for simulating the dynamics of
quantum systems; and he has also contributed to several
other popular Python libraries in the scientific computing
landscape. Robert is passionate about scientific computing
and software development and about teaching and communicating best practices for
bringing these fields together with optimal outcome: novel, reproducible, and extensible
computational results. Robert’s background includes 5 years of postdoctoral research in
theoretical and computational physics, and he is now working as a data scientist in the
IT industry.

xv
Other documents randomly have
different content
The Project Gutenberg eBook of The Southern
Literary Messenger, Vol. II., No. 9, August,
1836
This ebook is for the use of anyone anywhere in the United States
and most other parts of the world at no cost and with almost no
restrictions whatsoever. You may copy it, give it away or re-use it
under the terms of the Project Gutenberg License included with this
ebook or online at www.gutenberg.org. If you are not located in the
United States, you will have to check the laws of the country where
you are located before using this eBook.

Title: The Southern Literary Messenger, Vol. II., No. 9, August, 1836

Author: Various

Editor: Edgar Allan Poe

Release date: July 20, 2024 [eBook #74083]

Language: English

Original publication: Richmond: T. W. White, Publisher and


Proprietor, 1836

Credits: Ron Swanson

*** START OF THE PROJECT GUTENBERG EBOOK THE SOUTHERN


LITERARY MESSENGER, VOL. II., NO. 9, AUGUST, 1836 ***
THE
SOUTHERN LITERARY MESSENGER:
DEVOTED TO

EVERY DEPARTMENT OF

LITERATURE AND THE FINE


ARTS.

Au gré de nos desirs bien plus qu'au gré des vents.


Crebillon's Electre.

As we will, and not as the winds will.

RICHMOND:
T. W. WHITE, PUBLISHER AND PROPRIETOR.
1835-6.

CONTENTS OF VOLUME II, NUMBER 9


THE RULER'S FAITH: by Mrs. L. H. Sigourney
SKETCHES OF THE HISTORY and Present Condition of Tripoli, with some
accounts of the other Barbary States (No. XI.): by Robert Greenhow

STANZAS: by W. Gilmore Simms

THE RIGHT OF INSTRUCTION: by Judge Joseph Hopkinson

TO ——: by W. Gilmore Simms

A REMINISCENCE: by Dr. Francis Lieber

THE OLD MAN'S CAROUSAL: by James K. Paulding

PISCATORY REMINISCENCES

ISRAFEL: by E. A. Poe

JUDGMENT OF RHADAMANTHUS: by James K. Paulding

SCENES IN CAMPILLO: by Lieut. A. Slidell

THE PINE WOOD: by Dr. Robert M. Bird

THE BATTLE OF LODI: by Major Henry Lee

MARCUS CURTIUS: by Omega

BRITISH PARLIAMENT IN 1835 No. II. The House of Lords

TO A TORTOISE-SHELL COMB: by Mrs. E. F. Ellet

INFLUENCE OF NAMES: by H.

THE CITY OF SIN: by E. A. POE

A HINT, TOUCHING THE GREEK DRAMA: by Borealis

SACRED SONG: by W. Maxwell


A TOUR TO THE ISTHMUS: by a Yankee Dauber

LINES: by P. P. Cooke

THE LEARNED LANGUAGES: by Mathew Carey

FOURTH LECTURE on the faults of scholars: by James M. Garnett

A CASE NOT TO BE FOUND IN ANY OF THE BOOKS

MSS. OF JOHN RANDOLPH


LETTER IV
LETTER V
LETTER VI

A POLITE STRUGGLE

A PROFESSION FOR LADIES: by Mrs. Sarah J. Hale

EDITORIAL
RIGHT OF INSTRUCTION.
PINAKIDIA.

CRITICAL NOTICES
THE OLD WORLD AND THE NEW: by the Reverend Orville Dewey
RICHARDSON'S DICTIONARY: by Charles Richardson
BOOK OF GEMS: by poets and artists of Great Britain
SOUTH-SEA EXPEDITION: by the Committee on Naval Affairs
ELKSWATAWA: by James S. French
THE VIRGINIA SPRINGS: by Peregrine Prolix
A YEAR IN SPAIN: by Lieutenant Slidell
ADVENTURES IN SEARCH OF A HORSE: by Caveat Emptor
LAFITTE: by Professor Ingraham
DRAPER'S LECTURE: by John W. Draper, M.D.
LIEBER'S MEMORIAL: by Francis Lieber
HISTORY OF TEXAS: by David B. Edward
INKLINGS OF ADVENTURE: by N. P. Willis
AUTOGRAPHY

SOUTHERN LITERARY MESSENGER.

VOL. II. RICHMOND, AUGUST, 1836. NO.


IX.

T. W. WHITE, PROPRIETOR. FIVE DOLLARS PER ANNUM.

THE RULER'S FAITH.

BY MRS. L. H. SIGOURNEY.

“Come, lay thine hand upon her, and she shall live.”
Matthew 9th and 18th.
Death cometh to the chamber of the sick.
The ruler's daughter, like the peasant's child,
Grows pale as marble. Hark, that hollow moan
Which none may help, and then, the last, faint breath
Subsiding with a shudder!
The loud wail
Bespeaks an idol fallen from the shrine
Of a fond parent's heart. A wither'd flower
Is there, oh mother, where thy proudest hope
Solac'd itself with garlands, and beheld
New buddings every morn. Father, 'tis o'er!
That voice is silent, which had been thy harp,
Quickening thy footstep nightly toward thy home,
Mingling, perchance, an echo all too deep
Even with the temple-worship, when the soul
Should deal with God alone.
What stranger-step
Breaketh the trance of grief? Whose radiant brow
In meekness, and in majesty doth bend
Beside the bed of death?
“She doth but sleep,
The damsel is not dead.”
A smother'd hiss
Contemptuous rises from the wondering band
Who beat the breast and raise the licens'd wail
Of Judah's mourning.
Look upon the dead!
Heaves not the winding-sheet? Those trembling lids—
What peers between their fringes, like the hue
Of dewy violet? The blanch'd lips dispart,
And what a quivering, long-drawn sigh restores
Their rose-leaf beauty! Lo, the clay-cold hand
Graspeth the Master's, and with sudden spring
That shrouded sleeper, like a timid fawn,
Hides in her mother's bosom!
Faith's strong root
Was in the parent's spirit, and its boon
How beautiful!
O mother, who dost gaze
Upon thy daughter, in that deeper sleep
Which threats the soul's salvation, breathe her name
To that Redeemer's ear, both when she smiles
In all her glowing beauty on the morn,
And when, SKETCHES
at night, herOF
clustering tresses sweep,
THE HISTORY
Her downy pillow, in the trance of dreams,
Or when
AND PRESENT at pleasure's
CONDITION beckoning
OF TRIPOLI, she SOME
WITH goes forth,
ACCOUNTS OF THE
Or to the meshes of an
OTHER earthly love
BARBARY STATES.
Yields her young heart! Be eloquent for her!
Take no denial, till that N
gracious
O. XI. hand
Which rais'd the ruler's dead, give life to her—
That better life,BYwhose
ROBERTwings surmount the tomb!
GREENHOW.

By the evening of the 3d of July, the preparations for the


bombardment of the Emperor's castle were completed; ditches had
been dug to the extent of more than two thousand yards, and the
batteries some of which were within musket shot of the walls, were
armed with six sixteen-pounders, ten twenty-four-pounders, four
eleven-inch mortars and six nine-inch howitzers. In order to secure
themselves against any general attack, the French had likewise
established communications between the different bodies of their
forces by roads across the field and gardens, while they had
barricaded or otherwise fortified the lanes and passes which
separated their positions from those of their enemies. All this was
done notwithstanding the bold and persevering efforts of the
Algerines, who maintained an almost constant though ill-directed fire
on the workmen from their batteries, and annoyed them by frequent
sorties.

At day break on the morning of the 4th, a rocket was thrown up


from the quarters of the French commander as a signal for the
commencement of the attack, and all the batteries were instantly
opened on the devoted fortress. Its dauntless defenders returned
the fire, which they continued for some time with great spirit but
with little effect, their balls and shells causing scarcely any damage
to the persons or works of the besiegers. The walls of the castle,
high and entirely exposed, soon exhibited evidences of the skill of
the French artillerists; the materials of which they were built,
crumbled under the “iron shower” falling incessantly upon them; and
the embrasures, made unnecessarily wide, afforded but little
protection either to the guns or to those engaged in serving them.

By eight o'clock the guns of the castle were nearly all dismounted,
and the number of its effective defenders had been so much
diminished, that it was found necessary to desert the ramparts, and
retire within the great tower, which from the thickness of its walls
offered at least a temporary security. On this last place of refuge, the
Hasnagee hoisted a black flag, in token of his determination to die
rather than yield, according to the promise which he had made to
his master. He was however released from this promise by a signal
from the Casauba indicating the Dey's wish that the fortress should
be abandoned; this was accordingly done and the garrison escaped
just as the French had effected a practicable breach in its wall.
General Hurel who commanded the nearest battery, was then in the
act of advancing with his men towards the opening, when suddenly
the earth shook, the towers of the castle were seen to totter, flashes
of flame and dense clouds of smoke rose above them, and an
explosion ensued which momentarily stunned the ardent soldiers.
The Algerines, before they evacuated the castle, had fired a slow
match communicating with the powder magazines in its vaults, and
the last and strongest defence of Algiers was utterly destroyed. As
the smoke vanished, the walls of the fortress were seen rent and
shattered by the terrible concussion; the great tower was reduced to
a few shapeless masses, and the ground in the environs was
covered with fragments of wall, corpses and even cannon, which had
been projected into the air by the violence of the explosion. The
French soon recovered, and rushing forward with shouts of triumph,
planted their standard among the smoking ruins; scarcely too was
this done, ere the prompt and skilful engineers were directing the
workmen to clear away the interior of the place, and stop the
breaches in its outward walls, so as to protect it against the assaults
of its former possessors. The ruins of the Star fort were also
occupied, and preparations were made for erecting batteries on
them for the bombardment of the city.

Algiers was now completely exposed; in a few hours the artillery


which had so rapidly overwhelmed its strongest defence, would be
levelled against the palace of the Dey and the dwellings of the
citizens. Hussein and his subjects had done all that men could do in
defence of their country; and it was unnecessary farther to provoke
a foe who held them at his mercy. At two o'clock Sidi Mustapha, the
Dey's private secretary, appeared under a flag of truce at Bourmont's
head quarters, to offer on the part of his master, the surrender of
those claims against France which had led to the war, as well as the
payment of the expenses occasioned by the expedition, provided the
French would leave the country. It is scarcely necessary to say that
this proposition was rejected with scorn. “I hold in my hand,” was
the reply, “the fate of your city; nothing less than its unconditional
surrender can save the Dey and inhabitants from being buried in its
ruins.” With this answer Mustapha returned to the Casauba,
exclaiming, says Bourmont, “When the Algerines are at war with
France, they should obtain peace before the evening prayer.” Such a
speech may have been uttered by the trembling secretary, but when
repeated in the despatch of the victorious general it became a mere
fanfaronade.

A few bombs were immediately thrown into the town which


produced the desired effects. Hussein saw that his fate was in the
power of his enemies, and his whole anxiety was to obtain as good
terms as possible for himself and his own immediate followers; he
accordingly despatched a Turk named Mahmoud, and Bouderba a
Moor who had lived in Marseilles and spoke French, to entreat that
the firing might be stopped, promising a similar cessation on the side
of the Algerines. They received at first the same answer which had
been given to the Secretary; however a conference ensued between
them and Bourmont, which resulted in a suspension of hostilities.

As soon as the Dey had received the first answer of the French
General, he sent to entreat the intervention of the British Consul. Mr.
St. John instantly obeyed the summons, and after an interview with
the Dey, proceeded to Bourmont's head quarters which were by this
time established among the ruins of the Emperor's castle, in order to
learn with exactness the conditions required by him. Bourmont at
first objected to his interference, but subsequently thought proper to
treat with him. The plan of a Convention was in consequence drawn
up between them, by the terms of which, the Casauba and all the
other fortresses of the city were to be delivered to the French early
on the following morning; the Dey and soldiers were to quit Algiers
with their families and private property; the inhabitants were to be
protected in the enjoyment of their personal liberty, property and
religion; their women were to be respected, and their commerce and
industry to remain undisturbed.

This Convention was sent to the Dey and immediately returned with
his seal and signature affixed in token of his own assent; he
however required time to consult his Divan without whose
approbation it could not be legally executed. Bourmont agreed to
wait until the next morning; he did not however suspend his
preparations for the investment of the place, which were continued
with unabated activity.

The debate in the Divan lasted the whole night of the 4th, and it was
probably stormy; the younger and poorer members of the body
proposed, it is said, to murder Hussein, then divide the treasures of
the Casauba and escape with them to the interior of the country; the
older Turks who had wives and other valuables to lose, found the
conditions so much better than was expected, that they only
doubted as to their being observed by the French commander. The
morning's sun however put an end to the discussion, by enabling
them to see every height around the place occupied by the batteries
of their enemy; they therefore resigned themselves to their fate, and
Mahmoud and Bouderba were despatched to announce their
acceptance of the conditions proposed by the conqueror. The envoys
were likewise charged if possible to obtain a delay of twenty-four
hours before the entry of the French troops into the city; this was
peremptorily refused by Bourmont, who probably conceiving that
within that period the treasures of the Casauba might become the
“private property” of the Turks, insisted that the port, the forts and
the town should all be delivered to him before noon. The Dey of
course assented to this demand, and prepared for his retreat to a
house in the town which he had occupied before his elevation to the
throne; the Beys of Tittery and Constantina made their way with
their surviving followers to the country; the forts were evacuated,
and the Turks and citizens sullenly retired to their houses.

The French troops were in the meantime collected under arms;


every flag was unfurled, and all the pomp and circumstance of
warlike triumph was displayed, to render the serious ceremony more
imposing. At two o'clock the fleet was anchoring in security under
the dreaded batteries of the Mole, and the famous Algezr Al Ghazie
so long the terror as well as the reproach of Christian Europe, was in
the possession of the Franks.

Bourmont met at the gate the French prisoners who had been
liberated, and after receiving their felicitations he hastened to the
Casauba, whither a guard had been already despatched. The Dey
was just taking his departure, and his followers were endeavoring to
appropriate to themselves the rich shawls, hangings, plate, &c.
which had not been secured, when the appearance of the French
grenadiers put them to flight. The General received from Hussein the
keys of the treasury, and accompanied by Commissioners who had
been appointed to that effect he proceeded to inspect its contents.

Whether the amount of treasure found in the Casauba differed from


that stated in the report of the commissioners will probably ever
remain a subject for speculation. Shaler reckoned it at fifty-two
millions of dollars in 1818, when Ali Cogia transferred his residence
to the Casauba; his calculations were however founded only upon
the number and the probable values of the burthens of the mules
employed to transport it. The British Consul, when he visited Hussein
on the evening previous to the surrender of the city, “was admitted
by him” says Campbell,1 “to the chamber of his treasures. It was
paved with stone, for no wooden floor would have borne the weight
of them—golden coins literally in millions were heaped up like corn
in a granary several feet high.” A French officer who accompanied
Bourmont in his first visit describes rather more minutely the number
and size of the rooms containing these precious articles.
1 Letters from Algiers by Thomas Campbell, published in the London New Monthly
Magazine. These letters give an agreeable and interesting picture of Algiers as it now
is; the historical statements are, however, in almost every instance erroneous.

Such appear to be the only data from which we can estimate the
treasures in the Casauba previous to its surrender. Gold, silver and
jewels, to the value of forty-one millions of francs (seven millions
seven hundred and forty-nine thousand dollars,) declared by the
General and Commissioners appointed to superintend the affair, to
be the whole contents of the Algerine treasury, were transmitted to
France immediately after the conquest of the city.

To these fruits of the expedition are to be added, wool and other


articles found in the Magazines of the Regency, worth three millions
of francs, and brass cannon valued as old metal at four millions, thus
giving to the government an immediate return of more than nine
millions of dollars, besides ammunition, materials of various sorts
and public property to a vast amount. The whole expenses of the
armament, to the middle of September following the capture of the
place were reckoned at eight and a quarter millions of dollars, to
which should however be added nearly half as much more for the
cost of the blockade since June, 1827. Taking all the circumstances
into consideration, the French Government was probably the gainer
in the contest at the time of the capture of Algiers.
How many lives were lost during the war it is impossible to
determine with accuracy; between the 14th of June, the day on
which the French landed at Sidi Ferruch, and the 5th of July when
Algiers was surrendered, it is supposed that not less than six
hundred of their men were killed and two thousand five hundred
wounded. Of the loss on the side of the Algerines we have no
accounts, but it was probably greater than that of the French.

On the 11th of August the news of the surrender of Algiers reached


Paris, and was received with the utmost enthusiasm by all classes of
the population. The liberals could afford to rejoice as it came just too
late to produce any effect on the elections, the result of which was
known to be fatal to the Ministry. The Court was perhaps somewhat
disappointed by the failure of what was in reality the principal object
of the expedition; the baton of Marshal of France was indeed sent to
Bourmont, but the crosses (only three) to be distributed among his
officers were much less numerous than had been expected.

The British Ambassador immediately offered his congratulations to


Prince Polignac, expressing at the same time his conviction, that the
French Government “would keep its faith with his Court and would
not fall from the assurances given in the name of the Sovereign, that
the expedition was undertaken for the sole purpose of vindicating
the national honor, and not with views of acquisition or conquest.”
The Prince in answer “declared his readiness to repeat his former
assurances, from which he protested that their late success had
given the French government no inclination to depart.”

With this repetition of former assurances terminated all


correspondence on the subject between the government of Great
Britain and that of Charles X. His successor on the 10th of August,
immediately after his establishment on the throne, and before his
government was acknowledged by that of Great Britain, verbally
declared to Lord Stewart “his intention to fulfil the engagements of
the preceding government relative to Algiers.” We have already seen
how vague were those engagements. Charles the Tenth declared his
readiness, “in case the existing government of Algiers should be
overthrown, to concert immediately with the other Powers, the new
order of things to be there established, for the greatest advantage of
the Christian world.” The change produced in the political relations of
the European Governments, by the Revolution of July, has rendered
any such “concert” with regard to Algiers impossible; and the
engagement of the French King may be considered as obsolete as
that made by Great Britain at the peace of Amiens, to restore Malta
to the Knights of Saint John.

To return to Algiers. Immediately after their occupation of the city,


the conquerors took measures to conciliate the inhabitants, and to
free the country from the presence of the Turks. For the former
purpose administrative institutions were established, similar at least
in name and form to those which had previously existed; they were
however soon found to be inefficient, and were replaced by others
which have been also since abandoned. With regard to the Turks a
considerable number had perished in the conflicts, others went off
with the Beys of Tittery and Constantina, and only about three
thousand five hundred were left in the place. Of these the elder, and
such as had wives and houses, obtained permission to remain in
Algiers under certain conditions until they could dispose of their
property; the others were sent without delay to Turkey, each man
receiving five dollars on his departure.

On the 11th of July, Hussein embarked with his son-in-law the Aga
Ibrahim, and their families and attendants to the number of a
hundred, on board the frigate Jeanne d'Arc for Mahon, carrying with
them, it was said, upwards of a million of dollars. As he has no
farther connection with this history, it may be here stated, that from
Mahon he proceeded to Naples where he had the satisfaction to
learn that the Sovereign who had ordered, and the General who had
effected his overthrow were themselves in exile; from Naples he
went to Leghorn, in the vicinity of which he passed a year; in 1831
he visited Paris, where he was of course the object of universal
attention; his piety afterwards led him to make the pilgrimage to
Mecca, and he died in Egypt in 1835, aged about 70 years.
Notwithstanding his dethronement and exile, he was perhaps in
every respect, the most fortunate of the Deys of Algiers.

The Bey of Oran, on learning the fall of the capital, made his
submission to the conquerors and received their troops as garrisons
into the principal places on the coast of his province. Achmet Bey of
Constantina retired with the remnant of his forces and some Turks,
towards his capital, determined to resist the invaders to the last
extremity. As a first measure against him a division of the fleet under
Admiral Rosamel was sent with a detachment of troops commanded
by General Damremont to occupy Bona.

The Bey of Tittery appeared in person at Algiers on the 8th of July;


and after a conference with the General in Chief took the oath of
allegiance to the French before the Moorish Cadi or principal
municipal officer of the place, and was confirmed in his government.
He then invited Bourmont to make an excursion to Blida, a small
town at the foot of the great chain of Mount Atlas about twenty-four
miles south of the capital, assuring him that his presence there
would tend to quiet the apprehensions of the inhabitants, and
induce them the more readily to submit to the French. The Ex-Dey
Hussein, on being consulted with regard to the propriety of making
this excursion, declared his total want of confidence in the
assurances of Abderrahman, whom he described a designing and
treacherous knave. Notwithstanding this premonition, on the 23d of
July the Marshal (he had just received his baton) left Algiers with
about two thousand men and several of his principal officers for
Blida, which place they reached in the evening after a fatiguing
march across the Metijah. They were received with every
demonstration of joy by the inhabitants, who came out to meet
them bringing fruits and refreshments of all kinds; some uneasiness
was indeed excited by the number of the Kabyles, who appeared
loitering about the place and its vicinity; however no distrust was
manifested by the French, the soldiers bivouaced in an open square,
and the Marshal having occupied the best house in the place, was
about to retire to rest, when some musket shots were heard under
the window. One of his aid-de-camps went out to ascertain the
cause and was immediately brought back mortally wounded; the
assailants increased in numbers, and the French soldiers were soon
completely surrounded and exposed to a murderous fire. In this
state of things it was determined to retreat without delay to Algiers;
the men although fatigued with their day's march were formed in
order, and the party proceeded back to the city exposed during the
way to the unceasing attacks of their daring enemies.

The ill success of this first attempt on the part of the French to
penetrate the country, rendered the wandering tribes of Arabs and
Kabyles more bold and more determined to resist the invaders, who
were soon almost shut up within the walls of the capital. Several
expeditions have been subsequently sent from Algiers in the same
direction, the events of which are described in glowing colors in the
despatches of their commanders; in one of them the treacherous
Bey of Tittery was made prisoner and sent to Paris, where he
strutted his hour rather as a prince than as a captive; this and the
glory of planting the standard of France on a new soil, appear to
have been the only beneficial results obtained from these
excursions.

During the first ten days of August, no news was received from
France. On the 11th of that month, a corvette appeared in the bay;
she was recognized as French, but instead of the white flag of the
Bourbons the tri-color of the revolution appeared on her mast head.
The despatches brought by her were delivered to Bourmont, but
notwithstanding all his efforts to keep their contents secret, the
astounding details of the events which occurred in Paris during the
three days of July, soon became known. Bourmont assembled a
council of his principal officers and proposed to them to retain the
white cockade, and sail back to France with the army, in order to
defend the cause of Charles the Tenth. His arguments were however
unavailing; the majority declared in favor of the new state of things,
and the tri-colored flag had been already hoisted by the fleet. At
length after some days spent in hesitation, or in hopes that the
cause of the Bourbons might not be lost, he at length decided to
obey the orders which he had received, and his soldiers were
gratified by seeing that standard which they considered as the
symbol of victory, waving over the towers of the Casauba.

On the 2d of September Marshal Clausel arrived from France to


assume the command of the forces, in the name of King Louis
Philippe; on the same day, Bourmont accompanied by his two sons
and carrying with him the embalmed heart of the third who had
fallen in action, embarked on board an Austrian trading vessel for
Malaga. He has since been a wanderer in exile; and except for a few
weeks, during which he endeavored unsuccessfully to retrieve the
fortunes of a fiendish despot, his active spirit has been unemployed.
The Duke d'Escars and some other officers whose attachment to the
cause of the fallen dynasty, was either too strong or had been too
conspicuously manifested, also retired from the army; the general
popularity and good management of Clausel however soon
reconciled the majority of the disaffected to the change of rulers,
and restored the troops to discipline.

The division of the fleet commanded by Admiral Rosamel, consisting


of two ships of the line, three frigates and four smaller vessels,
which quitted Algiers on the 26th of July, arrived before Bona on the
7th of August. That town was instantly occupied by the troops under
Damremont, who endeavored to repair the fortifications and render
them tenable against the Bey of Constantina as it was expected that
he would soon attack them. The Kabyles however soon after
appearing in great numbers about the place, it was judged prudent
by the French Commander to withdraw with his troops to Algiers.
The wretched inhabitants, who relying upon the assurances of the
conquerors had quietly submitted to them, were thus left until the
spring of 1832, to maintain themselves as they could against the
savage mountaineers.
After the troops had been landed at Bona the French squadron
proceeded eastward and on the 7th of August was seen at the
entrance of the harbor of Tunis, where its appearance contributed to
hasten the conclusion of the negotiation then in progress between
the Consul of France and the Bey of that Regency. The result of the
negotiation was a treaty, signed at Tunis on the 8th of August, the
provisions of which were apparently more liberal and more nearly
universal in their application, than those of any convention
previously made between a Christian State and a Barbary Power. The
Bey of Tunis here distinctly renounced for himself and his
successors, the right of cruising against any nation, which should
renounce or have renounced the right of cruising against Tunis.
Christian prisoners of war were not to be enslaved under any
circumstances, but to be treated according to the usages of
European nations. Foreign vessels wrecked on the coasts of the
Regency were not to be plundered; their crews were to receive
every assistance; those guilty of maltreating or robbing them were
to be punished, and the government was made answerable for all
injuries to their persons or property. Foreign nations were to have
the privilege of establishing consular and commercial agents in any
part of the Regency, and no tribute or present was to be exacted
from or on account of them, on any occasion whatsoever. The
subjects of foreign nations were to be at liberty to trade in all parts
of the Regency, without being subject to any other than the
established duties; and the government was to exercise no right of
pre-emption or of monopoly, with regard to any goods which they
may wish to buy or sell. Finally, the Bey gives to the French the full
right of fishing for coral on certain parts of the coast of Tunis without
any tribute or duty. These conditions appear to evince a degree of
liberality on the part of France and of regard for the interests of
other nations, which her former diplomatic proceedings had not
prepared us to expect. However on examining the subject more
minutely, it will be seen that although something may have been
gained for the cause of civilization, by the formal admission of such
principles, yet nothing was in reality secured to any other Power
than France; for no other nation could or would avail itself of these
provisions, as France could not be expected to enforce their
observance, in any other cases than those in which the interests of
her own subjects were concerned. The treaty was received with
great dissatisfaction at Tunis; for which there was indeed just cause,
as it not only prescribed new rules for intercourse with foreign
nations but also interfered materially with the internal administration
of the country.

Having produced the desired effect at Tunis, Admiral Rosamel sailed


for Tripoli, off which he appeared on the 9th of August.

Ever since the precipitate departure of Baron Rousseau, the French


Consul, from Tripoli, in August 1829, the Pasha of that Regency had
been vainly endeavoring through the intercession of the Spanish
Consul, to avert the vengeance which he knew would fall upon him,
for his share in that affair. The news of the fall of Algiers left him
without hope; and therefore as soon as the French squadron had
come to anchor, he sent Hadji Mohammed the Bet-el-Mel or Judge of
inheritances, on board the Admiral's ship, with full powers to
conclude an arrangement. A convention was accordingly signed on
the 11th, containing besides the same general stipulations to which
the Bey of Tunis had agreed on the 8th, some severe and
humiliating engagements on the part of the Pasha. In the first
article, he agreed to deliver to the Admiral a letter, addressed to the
Emperor of France, in which he entreats his Majesty to accept his
most humble excuses for the circumstances which had obliged the
French Consul to quit his post; disavows all participation in the
calumnious reports circulated with respect to that agent; and
expresses his anxious desire for the restoration of friendly
intercourse between the two countries, as well as for the return of
Rousseau, to whom the excuses were to be repeated on his arrival.
Yusuf moreover agreed to pay 800,000 francs, one half immediately,
the remainder in December following, in exoneration of all demands
of French subjects against him.
The 400,000 francs were with some difficulty procured and delivered
in a few days after the signature of the Treaty; in December 200,000
more were paid and the revenues of the province of Bengazi were
pledged for the remainder. Yusuf was however spared the
mortification of being obliged to receive Rousseau again as French
Consul in Tripoli; his place was supplied by M. Schwebels, who
appears to be superior in capacity, acquirements and character to
the generality of such agents.

The forced loans and other acts of violence by means of which these
sums were raised, increased the unpopularity of the Pasha's
government and contributed to excite disturbances in his dominions.
In the spring of 1831, a formidable insurrection broke out in Fezzan,
to quell which the Bey Ali was sent with a large force. Of the
circumstances of the war we can obtain no accounts; its result was
the discomfiture of the Tripolines and the return of the Bey to the
capital. The rebels appear to have been headed by Abdi Zaleel, who
has been already mentioned as the grandson of the celebrated Sheik
Safanissa, and the Chief of the Arab tribe called the Waled Suleiman.
The successful issue of this revolt encouraged many of the
wandering tribes to throw off the authority of the Pasha, and his
difficulties were soon after increased by another heavy demand on
his treasury from abroad.

As soon as it was known that the French had obtained payment of


nearly all the debts due to their subjects, the British Government of
course insisted on a similar settlement in favor of its own merchants,
which the Pasha, according to the immemorial custom of Princes and
people in the East, evaded by every means in his power. Warrington
at length declared that he would be put off no longer; accordingly
on the 14th of July 1832, a British squadron of two frigates and a
sloop of war appeared in the bay, and Yusuf was summoned
immediately to pay a hundred and eighty thousand dollars to satisfy
the demands of his English creditors. The Pasha in vain repeated the
oft urged plea of poverty; in vain appealed to his sons, to his wives,
to his ministers, and to the citizens of Tripoli; the sum could not be
obtained, and although sixty per cent on the whole amount was
tendered in part payment, the inexorable Consul refused to receive
it. Yusuf in despair then determined to levy a contribution by force
on the inhabitants of the Messeah, the rich and populous plain near
the city; the attempt was resisted, the soldiers who were sent to
collect the tax were repulsed, and the people of the Messeah raised
the standard of rebellion.

A new actor now appeared on the scene.

It has been stated that on the death of the Pasha's eldest son
Mohammed, the claims of Emhammed the son of the deceased
Prince to the succession, had been set aside by Yusuf, in favor of Ali
his second son, who had been raised to the dignity of Bey.
Emhammed had now attained manhood, and though closely
watched by his uncle and grandfather had succeeded in forming a
small party among the people, who looked to him for deliverance
from the tyranny and oppression under which they groaned. In this
he had been assisted and encouraged by the British Consul, who
hating Ali on account of his connection with the D'Ghies family, and
his well known partiality to France, adopted this means to satisfy his
vengeance. Warrington has indeed been supposed to have carried
his views still farther, and to have fomented disturbances in Tripoli,
in order to obtain possession of the country for Great Britain. The
sequel will show how far such suppositions were warranted.

As soon as the insurrection in the Messeah broke out, the


neighboring Arab tribes came in crowds to join the rebels, and
Emhammed, having succeeded in making his escape from the city,
was proclaimed by them Pasha of Tripoli. The Bey Ali immediately
assembled his adherents, and on the 27th of July 1832, a battle was
fought on the sea shore between them and the insurgents.
Emhammed's party was successful; the Bey's troops were driven
back into the city, and the insurgents, receiving daily accessions to
their forces, were soon able to close effectually all the
communications of the place on the land side; a battery was also
established by them at the entrance of the harbor on its eastern
shore, in order to prevent the entrance of vessels. In a few days the
city was completely invested by the besiegers, who began to
bombard it; and the supply of provisions from the country being thus
cut off, the inhabitants were threatened with the horrors of famine.
The Consuls were however informed by Emhammed, that they might
be furnished with necessaries for their families, by means of boats
sent under the flag of a Christian nation to his batteries.

In the meantime, the British Consul had struck his flag, and the
besiegers were in hopes that an attack would be made on the place
by the squadron. These expectations were however disappointed by
the sudden departure of the ships, in consequence it was supposed
of an order from Malta, to which island Colonel Warrington shortly
after sailed with his family in an Austrian brig.

Things continued in this state of uncertainty until the 12th of August,


when the Consuls were informed by Yusuf, at a public audience, in
the presence of his Divan and the principal persons of the place, that
he had abdicated the throne in favor of his son Ali, whom he
requested them to consider as Pasha of Tripoli. Letters were at the
same time delivered to the Consuls addressed to the heads of their
respective Governments, formally communicating the same
intelligence, and soliciting from each the speedy recognition of the
new sovereign. The means by which the old man was thus induced
to transfer his powers to his son are not known; there is reason to
believe however that he was impelled to it by the threats of Ali, and
the promises and representations of the French Consul, both of
whom had cause to apprehend that an admission of Emhammed's
claims to the succession might otherwise be extorted from him by
Warrington on his return from Malta. Ali immediately assumed the
authority and title of Pasha, appointing as Prime Minister his brother-
in-law Mohammed d'Ghies, (the younger, the old minister of that
name died in 1831) who has been already mentioned in connection
with the affair of Major Laing's papers.
STANZAS.

BY W. GILMORE SIMMS.
Oh, lovely were once her eyes, but grief
Their light hath now o'erclouded—
And her lips were sweet, like the budding leaf,
Though now their bloom be shrouded—
For in her heart, a malady
Like the canker-worm in the rose,
Preys ever there, unceasingly,
And gives her no repose.

It is sad to think, in a few short hours,


We shall look on her no longer,
For the glance gives sign of the failing powers,
And the pang grows hourly stronger;
We shall lose the balm of her budding breath,
We shall hear her voice no more;
We shall see those sweet eyes sealed in death,
That we once could so adore.

Yet shall I not weep, though losing all


For many long days I so have loved;
The tear that from mine eyes would fall,
My thought has well reproved:
For hers has been a doomed life,
And those who love her well, should pray,
That she may quickly lose the strife,
That has eaten her heart away.

THE RIGHT OF INSTRUCTION.


BY JUDGE JOSEPH HOPKINSON.

Dear Sir—I am well aware that my letter on the Right of Instruction,


published in your June number, will encounter, in Virginia and
elsewhere, names of high and deserved authority, and talents of
great power, if it shall be thought worthy of any attention. I must
therefore beg you to allow me to explain my views of this interesting
subject, a little more fully than was necessary or proper in a letter to
a friend. The additions, however, will be briefly made. I am
particularly desirous to sustain myself by the countenance of our
distinguished patriots and jurists, especially those who, having
assisted in framing the government, may be presumed to
understand its mechanism at least as well as the politicians of a later
date; who are, as I have suggested, the authors of the doctrine of
instructions. It was unknown to those who made the constitution—
as well as to those writers and speakers who afterwards attacked
and defended it.

It is a matter of familiar history that from the commencement of this


government, there has been a party, particularly in the South,
powerful by its talents, its character and the public confidence, who
have cherished and propagated, with unwearied efforts, a jealous
fear of the power of the general government. They have taught and,
I may not doubt, truly believed that this power would swallow the
independence of the states, or so depress their influence and strip
them of their rights, that they would finally become mere
subordinate corporations, living and acting by the will of a master. I
do not stop to examine the justice of this apprehension, nor to show
that the federal government, constitutionally administered, (and no
fair argument can be drawn from usurpation and violence,) has more
to fear from the power of the states than the states from it. This is
not my present purpose. I would show how the doctrine of
instructions was introduced among us. It was one of the devices and
means resorted to—and invented by the party I have alluded to, to
cripple the federal power, and, in this way, to give the states a
control over the action of the general government, which they could
not exercise directly under any power or rights given or reserved to
them in the constitution they had adopted. Thus by binding their
representatives in Congress by the obligation of obedience to their
instructions, and by limiting and fettering the powers of the federal
body by their doctrines of constitutional construction, they would
acquire an ascendancy over the federal operations which would
reduce that body to a bloodless, fleshless skeleton.

In looking for a support for my opinions upon this subject, I was


naturally led to open the volume of the “Secret Proceedings and
Debates of the Convention,” published from the notes of Chief
Justice Yates. In this volume we find also the information
communicated, by Luther Martin, Esq. a delegate to the federal
convention from the state of Maryland, to the legislature of
Maryland, relative to the proceedings of the convention. This
communication occupies about ninety pages of the book, and
contains a string of resolutions, amounting to nineteen, reported to
the convention by a committee of the whole house. The fourth of
these resolutions proposed “That the members of the second branch
of the legislature ought to be chosen by the individual legislatures,
to be of the age of thirty years at least, to hold their offices for a
term sufficient to insure their independence, namely, seven years,”
&c. There is another provision in this resolution which shows an
intention to make the senators equally independent of the several
states and of the United States. It is that they are “to be ineligible to
any office by a particular state—or under the authority of the United
States—except those peculiarly belonging to the functions of the
second branch, during the term of service, and under the national
government for the space of one year after its expiration.”

Mr. Martin was a decided opponent to the adoption of the


constitution; he was opposed to federal power—a friend of state
power—and seeking every means by which he could restrain the first
and strengthen and enlarge the latter. He especially feared the

You might also like